You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
pushd "%CD%"
CD /D "%~dp0"
:main
echo 1、查看Windows Defender状态
echo 2、切换Windows Defender状态
set /p i=选择数字后回车:
if %i%==1 goto main1
if %i%==2 goto main2
:main1
powershell "if((Get-MpPreference).DisableRealtimeMonitoring){write-host Windows Defender实时保护已关闭}else{write-host Windows Defender实时保护已开启}"
goto continue
:main2
powershell "if((Get-MpPreference).DisableRealtimeMonitoring){Set-MpPreference -DisableRealtimeMonitoring 0;write-host Windows Defender实时保护已开启}else{Set-MpPreference -DisableRealtimeMonitoring 1;write-host Windows Defender实时保护已关闭}"