美文网首页
powershell命令管理Windows Defender相关

powershell命令管理Windows Defender相关

作者: 獨孤記憶 | 来源:发表于2021-11-19 15:50 被阅读0次
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

相关文章

网友评论

      本文标题:powershell命令管理Windows Defender相关

      本文链接:https://www.haomeiwen.com/subject/vhastrtx.html