Windows Defender Exclusions SQL Server

These are the Powershell commands for exclusions on a Microsoft SQL Server on Windows 2016.  This only includes the Database role, if you have Reporting, Analysis, Full Text Indexing or other roles there will be more.

The -ExclusionPath will need to be changed to what you configured in SQL on install.

Powershell must be run as administrator.

Add-MpPreference -ExclusionExtension ".mdf" Add-MpPreference -ExclusionExtension ".ldf" Add-MpPreference -ExclusionExtension ".ndf" Add-MpPreference -ExclusionExtension ".bak" Add-MpPreference -ExclusionExtension ".trn" Add-MpPreference -ExclusionExtension ".trc" Add-MpPreference -ExclusionExtension ".sqlaudit" Add-MpPreference -ExclusionExtension ".sql" Add-MpPreference -ExclusionProcess "SQLServr.exe" Add-MpPreference -ExclusionPath "E:\Temp" Add-MpPreference -ExclusionPath F:\Logs Add-MpPreference -ExclusionPath G:\Data Add-MpPreference -ExclusionPath H:\Backup