Forum Discussion

ArtTrenton's avatar
ArtTrenton
Copper Contributor
Dec 24, 2022
Solved

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

  • ArtTrenton's avatar
    ArtTrenton
    Copper 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

Resources