Skip to content

Add path exclusions sample

1
2
3
$sharepointAVexclusions = 'E:\Program Files\Common Files\Microsoft Shared\Web Server Extensions', 'E:\Program Files\Microsoft Office Servers\16.0\Data\Office Server\Applications', 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files', 'E:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config', 'c:\Users\SP_Admin\AppData\Local\Temp\WebTempDir', 'C:\ProgramData\Microsoft\SharePoint','C:\WINDOWS\System32\LogFiles', 'C:\Windows\Syswow64\LogFiles', 'C:\Users\SP_Admin\AppData\Local\Temp', 'C:\Users\Default\AppData\Local\Temp',  'C:\inetpub\wwwroot\wss\VirtualDirectories', 'C:\inetpub\temp\IIS Temporary Compressed Files'

$sharepointAVexclusions | ForEach-Object -Process { Add-MpPreference -ExclusionPath $_ }