SOLVED

Start-MpScan -ScanType FullScan ignores ExclusionExtension preference

Copper Contributor

Potential workaround would be to allow the -ScanPath parameter to accept a String[] of drive letters when performing a CustomScan.

 

#EXAMPLE - Custom Windows Defender Scan on Multiple Drives with Exclusions
#Requires -RunAsAdministrator
Import-Module Defender
Set-MpPreference -ExclusionExtension "*.iso,*.mp3,*.wav"
Start-MpScan -ScanType CustomScan -ScanPath "C:,D:"

 

 

1 Reply
best response confirmed by ArtTrenton (Copper Contributor)
Solution

I have written a PowerShell script to automate a custom Windows Defender scan on multiple drives with exclusions. Check out my GitHub Gist: atrenton/Start-Custom-Scan.md

1 best response

Accepted Solutions
best response confirmed by ArtTrenton (Copper Contributor)
Solution

I have written a PowerShell script to automate a custom Windows Defender scan on multiple drives with exclusions. Check out my GitHub Gist: atrenton/Start-Custom-Scan.md

View solution in original post