AV Exclusions

Configure AV exclusion rules to avoid detection.

Windows Defender

Retrieve the current configuration:

 Get-MpPreference | fl ExclusionExtension,ExclusionPath,ExclusionProcess

Disable scheduled and real-time scanning for files in this folder:

Add-MpPreference -ExclusionPath "C:\Temp"

Remove folder from exclusion list:

Remove-MpPreference -ExclusionPath "C:\Temp"

References: