Windows Defender Nuke - VBS
Windows Defender Nuke via a VBS Script

I needed a script that “nuked” defender on a vanilla build of Windows 11. I created a little vbs script for automating the registry key changes needed, including putting the system into, then out of safe mode. Script features:
- UAC Elevation
- Put’s the system into safe mode
- Makes the registry key changes required to nuke defender while in safe mode
- Restarts machine back into normal mode
This script will completely disable all engines of Microsoft Defender via Safe mode. Defender will still be present on the system, however it will fail to operate, effectively nuked. Attempting to restart defender will return an “unexpected error”.
If you need to switch back on defender just undo the the registry key changes.
You need to be a local admin on the system.
Tested and confirmed fully working on:
- Windows 11 Version 24H2 Build 26100.34
- Windows 11 Version 24H2 Build 26100.3476
- Windows 11 Version 25H2 Build 26200.9457
