Created
January 20, 2024 01:52
-
-
Save ccy/ec452285362d9b65aa23814fcfc3294f to your computer and use it in GitHub Desktop.
Disable Windows Defender
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Windows defender tasks in Normal mode | |
Get-ScheduledTask | Where-Object { $_.TaskName -like "Windows Defender*" } | Disable-ScheduledTask | |
# Reboot to safe mode (Boot option: Safe mode) | |
msconfig | |
# Disable these services in safe mode | |
foreach ($SVC in "Sense", "WdBoot", "WdFilter", "WdNisDrv", "WdNisSvc", "WinDefend") { Set-ItemProperty -Path ("HKLM:\SYSTEM\CurrentControlSet\Services\" + $SVC) -Name Start -Value 4 } | |
# Reboot to normal mode (Startup Selection: Normal startup) | |
msconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment