sync: auto-sync from DESKTOP-0O8A1RL at 2026-05-15 15:23:02
Author: Mike Swanson Machine: DESKTOP-0O8A1RL Timestamp: 2026-05-15 15:23:02
This commit is contained in:
12
session-logs/remove_defender.ps1
Normal file
12
session-logs/remove_defender.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
$result = Uninstall-WindowsFeature -Name Windows-Defender -ErrorAction SilentlyContinue
|
||||
Write-Host "Success: $($result.Success)"
|
||||
Write-Host "RestartNeeded: $($result.RestartNeeded)"
|
||||
Write-Host "ExitCode: $($result.ExitCode)"
|
||||
if ($result.Success) {
|
||||
shutdown /r /t 10 /f
|
||||
Write-Host "Rebooting in 10s..."
|
||||
} else {
|
||||
Write-Host "Feature removal failed - trying registry approach"
|
||||
Set-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Defender\Features" -Name "TamperProtection" -Value 4
|
||||
Write-Host "TamperProtection set to 4 - reboot required"
|
||||
}
|
||||
Reference in New Issue
Block a user