Exclude specific file from Windows Defender command line
Solution 1:
Use the "Add-MpPreference -ExclusionPath" command in Powershell
Example in Powershell:
PS C:\> Add-MpPreference -ExclusionPath "C:\Temp"
This command adds the folder C:\Temp to the exclusion list. The command disables Windows Defender scheduled and real-time scanning for files in this folder.
Reference
PS, thanks scroeder