Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

Enable or Disable Windows Defender Potentially Unwanted Applications (PUA) Protection

Code
:: Enable or Disable Windows Defender Potentially Unwanted Applications (PUA) Protection in Windows 10

@Echo Off

Cls & Color 0E


call :IsAdmin




Cls & Mode CON  LINES=11 COLS=95 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo        Enable Windows Defender Potentially Unwanted Applications (PUA) Protection (Y/N)?  
Echo.      
Echo.
Echo.


Set /p input= RESPONSE:

If /i  Not %input%==Y (Goto :_Ex) Else (Goto :_Start)

:_Ex
If /i Not %input%==N  (Goto :EOF) Else (Goto :_RegRestore)



:_Start

Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "PUAProtection" /t REG_DWORD /d "1" /f >Nul
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d "1" /f >Nul


Cls & Mode CON  LINES=11 COLS=75 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo         Enabling Potentially Unwanted Applications (PUA) Protection
  
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul
Goto Reboot


:_RegRestore

Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender" /v "PUAProtection" /t REG_DWORD /d "0" /f >Nul
Reg.exe add "HKLM\SOFTWARE\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d "0" /f >Nul


Cls & Mode CON  LINES=11 COLS=75 & Color 0E & Title Created By FreeBooter
Echo.
Echo.
Echo.
Echo.
Echo        Disabling Potentially Unwanted Applications (PUA) Protection  
Echo.
Echo.
Echo.
Ping -n 6 localhost >Nul

:Reboot

CHOICE /C YN /M "Press Y to Reboot, N for exiting script."


If %errorlevel% == 1 ( Shutdown /r /t 0) Else (Exit)



:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ...
Pause & Exit
)
Cls
goto:eof


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Ariel780Jul 7, 2021 01:17 PM 2 304 Jul 7, 2021 01:17 PM
Last Post: Ariel780
[Shell] by Emre_Jan 12, 2021 11:16 PM 0 141 Jan 12, 2021 11:16 PM
Last Post: Emre_
[Shell] by Emre_Jan 2, 2021 06:05 AM 1 192 Jan 2, 2021 06:05 AM
Last Post: HUIU