To disable malware filtering on the local Mailbox server, run this command in the Exchange Management Shell:
& $env:ExchangeInstallPath\Scripts\Disable-AntimalwareScanning.ps1
To enable malware filtering on the local Mailbox server, run this command in the Exchange Management Shell:
& $env:ExchangeInstallPath\Scripts\Enable-AntimalwareScanning.ps1
If the command was successful, you see this message:
Anti-malware scanning is successfully
Note: The enable script also applies malware engine and definition updates as needed.
Restart the Exchange Transport service by running this command, which will temporarily interrupt mail flow on the server:
Restart-Service MSExchangeTransport
The change might take up to 10 minutes to take effect.