Skip to content

Instantly share code, notes, and snippets.

@grenade
Created November 28, 2018 17:53
Show Gist options
  • Save grenade/76f2a84e30658e0e7fba091954f76970 to your computer and use it in GitHub Desktop.
Save grenade/76f2a84e30658e0e7fba091954f76970 to your computer and use it in GitHub Desktop.
Disable Windows Defender
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableConfig' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SOFTWARE\Policies\Microsoft\Windows Defender' -name 'DisableAntiSpyware' -type 'Dword' -value 1
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\wscsvc' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\SecurityHealthService' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Sense' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdBoot' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdFilter' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisDrv' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WdNisSvc' -name 'Start' -type 'Dword' -value 4
Set-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\WinDefend' -name 'Start' -type 'Dword' -value 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment