antivirus: excludes a specific file from the Windows Defender command line

Use the "Add-MpPreference -ExclusionPath" command in Powershell

Example in Powershell:

    PS C: > Add-MpPreference -ExclusionPath "C:  Temp" 

This command adds the C: Temp folder to the exclusion list. The command disables the scheduled and real-time scan of Windows Defender for the files in this folder.


PS, thanks scroeder