Forum Discussion
ArtTrenton
Dec 24, 2022Copper Contributor
Start-MpScan -ScanType FullScan ignores ExclusionExtension preference
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:"
I have written a PowerShell script to automate a custom Windows Defender scan on multiple drives with exclusions. Check out my GitHub Gist: https://gist.github.com/atrenton/cffb27bcf732d2fe1eec0dd305edec1a
1 Reply
Sort By
- ArtTrentonCopper Contributor
I have written a PowerShell script to automate a custom Windows Defender scan on multiple drives with exclusions. Check out my GitHub Gist: https://gist.github.com/atrenton/cffb27bcf732d2fe1eec0dd305edec1a