Skip to main content

Batch Add Microsoft Exchange 2016 exclusions to Windows Defender on Windows 2016

When you install Microsoft Exchange 2016 on Windows 2016 server it is suggested to add some exclusions to Windows Defender. Since the list is quite large, use PowerShell to add exclusions. Exclusion list can be found at https://technet.microsoft.com/en-us/library/bb332342(v=exchg.160).aspx

SECURITY PRECAUTION - Don't just blindly copy below commands and exclusions but check them. If anyone manipulated the below list on this site without my knowledge you will end adding exclusions you don't want to have.

  1. Run PowerShell on Windows 2016 Exchange 2016 server as administrator.
  2. Add Folder Exclusions
  3. Set-MpPreference -ExclusionPath $env:SystemRoot"\Cluster",$env:ExchangeInstallPath"ClientAccess\OAB",$env:ExchangeInstallPath"FIP-FS",$env:ExchangeInstallPath"GroupMetrics",$env:ExchangeInstallPath"Logging",$env:ExchangeInstallPath"Mailbox",$env:ExchangeInstallPath"TransportRoles\Data\Adam",$env:ExchangeInstallPath"TransportRoles\Data\IpFilter",$env:ExchangeInstallPath"TransportRoles\Data\Queue",$env:ExchangeInstallPath"TransportRoles\Data\SenderReputation",$env:ExchangeInstallPath"TransportRoles\Data\Temp",$env:ExchangeInstallPath"TransportRoles\Logs",$env:ExchangeInstallPath"TransportRoles\Pickup",$env:ExchangeInstallPath"TransportRoles\Replay",$env:ExchangeInstallPath"UnifiedMessaging\Grammars",$env:ExchangeInstallPath"UnifiedMessaging\Prompts",$env:ExchangeInstallPath"UnifiedMessaging\Temp",$env:ExchangeInstallPath"UnifiedMessaging\Voicemail",$env:ExchangeInstallPath"Working\OleConverter",$env:SystemDrive"\inetpub\temp\IIS Temporary Compressed Files",$env:SystemRoot"\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files",$env:SystemRoot"\System32\Inetsrv"
  4. Add Process exclusions
  5. Set-MpPreference -ExclusionProcess "ComplianceAuditService.exe","Dsamain.exe","EdgeTransport.exe","fms.exe","hostcontrollerservice.exe","inetinfo.exe","Microsoft.Exchange.AntispamUpdateSvc.exe","Microsoft.Exchange.ContentFilter.Wrapper.exe","Microsoft.Exchange.Diagnostics.Service.exe","Microsoft.Exchange.Directory.TopologyService.exe","Microsoft.Exchange.EdgeCredentialSvc.exe","Microsoft.Exchange.EdgeSyncSvc.exe","Microsoft.Exchange.Imap4.exe","Microsoft.Exchange.Imap4service.exe","Microsoft.Exchange.Notifications.Broker.exe","Microsoft.Exchange.Pop3.exe","Microsoft.Exchange.Pop3service.exe","Microsoft.Exchange.ProtectedServiceHost.exe","Microsoft.Exchange.RPCClientAccess.Service.exe","Microsoft.Exchange.Search.Service.exe","Microsoft.Exchange.Servicehost.exe","Microsoft.Exchange.Store.Service.exe","Microsoft.Exchange.Store.Worker.exe","Microsoft.Exchange.UM.CallRouter.exe","MSExchangeCompliance.exe","MSExchangeDagMgmt.exe","MSExchangeDelivery.exe","MSExchangeFrontendTransport.exe","MSExchangeHMHost.exe","MSExchangeHMWorker.exe","MSExchangeMailboxAssistants.exe","MSExchangeMailboxReplication.exe","MSExchangeRepl.exe","MSExchangeSubmission.exe","MSExchangeTransport.exe","MSExchangeTransportLogSearch.exe","MSExchangeThrottling.exe","Noderunner.exe","OleConverter.exe","ParserServer.exe","Powershell.exe","ScanEngineTest.exe","ScanningProcess.exe","UmService.exe","UmWorkerProcess.exe","UpdateService.exe","W3wp.exe","wsbexchange.exe"
  6. Add Extension exclusions
  7. Set-MpPreference -ExclusionExtension ".config",".chk",".edb",".jfm",".jrs",".log",".que",".dsc",".txt",".cfg",".grxml",".lzx"


Comments

Popular posts from this blog

Change SMTP port 25 in Exchange 2007, 2010

For some reason you might want to change default SMTP port number 25 Exchange 2007 is using. Exchange 2007 uses RECEIVE AND SEND connectors, one for receiving mails and other for sending mails (obviously ;) So you need to change ports on those connectors. I will not say those two, because you might be using more than two. You change Receive connector port by opening the connector properties in Exchange Management Console --> Hub Transport --> RECEIVECONNECTORNAME --> Properties --> Network --> Local IP Addresses (Edit Receive Connector Binding) Just to clarify what "Local IP Addresses" and "Remote Servers" are (from Exchange 2007 help), because I find it little bit confusing: Use these local IP Addresses to receive mail Use this list to specify the IP addresses and port numbers on which this Receive connector listens for incoming mail. Receive mail from remote servers which have these IP addresses Use this list to specify the

The attempt to connect to http://yourserver/PowerShell using "Kerberos" authentication failed

The error you get: The attempt to connect to http://yourserver/PowerShell using "Kerberos" authentication failed: Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found If you removed Exchange server from the machine and installed it again, you can get following error when you open Exchange Management Console: The following error occurred while attempting to connect to the specified Exchange server 'yourserver.domain.com': The attempt to connect to http://yourserver.domain.com/PowerShell using "Kerberos" authentication failed: Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found. Possible causes are:   -The user name or password specified are invalid.   -Kerbero

Error "<#5.5.2 smtp;554 5.5.2 Invalid data in message> #SMTP#" when you send attachment in your mail

Some users were receiving error <#5.5.2 smtp;554 5.5.2 Invalid data in message> #SMTP# when they sent message with attachment. The problem is when attached document name is longer than 50 characters . Some Firewalls have header size restriction and that limit blocks this messages to be sent. To correct this, change header limit on affected Firewall or shorten the name of the document you are sending (which is probably not good permanent solution). ****** Update #1 : Default header size limit in Exchange 2007 is 64K . Update #2: It might be the SMTP version problem. Mail is rejected with CONTENT-DISPOSITION error (overly long message header field for CONTENT-DISPOSITION) but not for all SMTP servers (same mail sent through different SMTP servers). If you send mail with attachment that has name longer than 50 characters from Exchange 2007 directly through DNS you may encounter this error, but if you send same mail from Exchange 2007 through smart host (other than Exch