1、查看Defender配置:
powershell.exe Get-MpPreference
2、添加文件夹排除项
powershell.exe Set-MpPreference -ExclusionPath "C:\tmp", "C:\Mars"
3、添加文件排除项
powershell.exe Set-MpPreference -ExclusionProcess "D:\CloudMusic.exe\cloudmusic.exe", "Vmware.exe"
4、删除文件夹排除项
powershell.exe Remove-MpPreference -ExclusionPath "C:\tmp", "C:\Mars"
5、删除文件排除项
powershell.exe Set-MpPreference -ExclusionProcess "D:\CloudMusic.exe\cloudmusic.exe", "Vmware.exe""
6、关闭Windefend实时保护
powershell.exe Set-MpPreference -DisableRealtimeMonitoring $true
注:此项需要手动在病毒和威胁防护处关闭篡改防护才会生效

7、打开Windefend实时保护
powershell.exe Set-MpPreference -DisableRealtimeMonitoring $false
网友评论