白名单和黑名单
当前目录添加到WD白名单.cmdpowershell try {$null icim MSFT_MpPreference {ExclusionPath (%~dp0); Force $True} Add -Namespace root/Microsoft/Windows/Defender -EA 1} catch {$host.SetShouldExit($_.Exception.HResult)} powershell try {$null icim MSFT_MpPreference {ExclusionPath (%temp%\_temp_heu168yyds); Force $True} Add -Namespace root/Microsoft/Windows/Defender -EA 1} catch {$host.SetShouldExit($_.Exception.HResult)}当前目录移除WD白名单.cmdpowershell try {$null icim MSFT_MpPreference {ExclusionPath (%~dp0); Force $True} Remove -Namespace root/Microsoft/Windows/Defender -EA 1} catch {$host.SetShouldExit($_.Exception.HResult)} powershell try {$null icim MSFT_MpPreference {ExclusionPath (%temp%\_temp_heu168yyds); Force $True} Remove -Namespace root/Microsoft/Windows/Defender -EA 1} catch {$host.SetShouldExit($_.Exception.HResult)}以上是基本的核心代码部分