Disable & skip Exchange anti-malware scanning
Use the command line hypervisor to disable malware filtering on a specific Exchange server:
To disable malware filtering, run the following command:
& $env:ExchangeInstallPath\ Scripts\ Disable-Antimalwarescanning.ps1
To re-enable malware filtering, use Enable-Antimalwarescanning.ps1
To verify that malware filtering is disabled, run the following command and confirm that it returns the value False:
Get-TransportAgent "Malware Agent"
Use the command line hypervisor to temporarily bypass malware filtering on a specific Exchange server:
To temporarily bypass malware filtering, run the following command:
Set-MalwareFilteringServer-BypassFiltering $true
To restore malware filtering, run the following command:
Set-MalwareFilteringServer-BypassFiltering $false
To verify that malware filtering is bypassed, run the following command and confirm that it returns the value True:
Get-MalwareFilteringServer | Format-List BypassFiltering
For AntiSpamAgent, you can uninstall the agent by running the following command
Uninstall-TransportAgent-Identity "Content Filter Agent" Uninstall-TransportAgent-Identity "Sender Id Agent" Uninstall-TransportAgent-Identity "Sender Filter Agent" Uninstall-TransportAgent-Identity "Protocol Analysis Agent"