Slow 'mdss.ps1' commands on Windows
Applies to: MetaDefender Storage Security 4.5.2 and later, installed on Windows Server.
Symptoms
mdss.ps1 -c restarttakes about 10 minutes instead of 1 to 2 minutes.mdss.ps1 -c load-caand othermdss.ps1commands take 1 to 2 minutes.Every PowerShell script in
<install folder>\scriptswaits about 50 seconds before it starts. No error is logged and the scripts complete normally.
Cause
Starting with MDSS 4.5.2, the PowerShell scripts shipped with MDSS are digitally signed. When a Software Restriction Policy (SRP) is applied to the server through Group Policy, even with the default security level "Unrestricted", Windows verifies the signature of every script before PowerShell runs it. Part of that verification is online:
a revocation check of the signing certificate against DigiCert (OCSP and CRL), and
a refresh of Microsoft's trusted-root and disallowed-certificate lists from
ctldl.windowsupdate.com.
If the server cannot reach these hosts and the firewall silently drops the connections, every attempt runs to its timeout: about 20 seconds for the revocation check and 2 x 15 seconds for the Microsoft lists, about 50 seconds per script. MDSS runs many scripts per command, so the waits add up to minutes.
Confirm
Run in an elevated PowerShell on the MDSS server. Adjust the path to your install folder.
Expected: under 1 second. If TotalSeconds is in the tens, this article applies.
Optional checks:
If the registry key exists, an SRP is applied to the server. TcpTestSucceeded : False after a long wait means the firewall drops the connection.
Resolution (recommended)
Allow outbound HTTP (TCP port 80, not 443) from the MDSS server to:
ocsp.digicert.comcrl3.digicert.comcrl4.digicert.comcacerts.digicert.comctldl.windowsupdate.com
The checks then complete in milliseconds and Windows caches the results.
Workaround for servers without Internet access
Both changes only stop Windows from waiting for connections that fail anyway. Validated on Windows Server 2025 with MDSS 4.5.2.
Stop the Microsoft certificate-list downloads. In an elevated command prompt:
reg add "HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\AuthRoot" /v DisableRootAutoUpdate /t REG_DWORD /d 1 /freg add "HKLM\SOFTWARE\Policies\Microsoft\SystemCertificates\AuthRoot" /v EnableDisallowedCertAutoUpdate /t REG_DWORD /d 0 /fMake the DigiCert lookups fail immediately. Add these lines to
C:\Windows\System32\drivers\etc\hosts, then runipconfig /flushdns:0.0.0.0 ocsp.digicert.com0.0.0.0 crl3.digicert.com0.0.0.0 crl4.digicert.com0.0.0.0 cacerts.digicert.comThis step has no effect if the server uses a WinHTTP proxy. Check with
netsh winhttp show proxy.Open a new PowerShell window and run the command from Confirm again. Expected: well under 1 second. No reboot is needed. MDSS picks up the change at the next
mdss.ps1 -c restart.
Note: Microsoft recommends keeping the disallowed-certificate list update enabled. On a server without Internet access that update cannot run anyway. If you later allow the access, revert the workaround so the updates resume.
Revert the workaround
Remove the four lines from the hosts file and run ipconfig /flushdns.