Browse Source

remove reg-import from defender

pull/31/head
Alex Hirsch 9 years ago
parent
commit
b159c7452b
  1. 17
      scripts/disable-defender.ps1

17
scripts/disable-defender.ps1

@ -1,16 +1,9 @@
# Description: # Description:
# This script will disable Windows Defender via Group Policies. # This script will disable Windows Defender via Group Policies.
Import-Module -DisableNameChecking $PSScriptRoot\..\lib\reg-helper.psm1
echo "Disabling Windows Defender" echo "Disabling Windows Defender"
Import-Registry(@" mkdir -Force "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender"
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender] sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender" "DisableAntiSpyware" 1
"DisableAntiSpyware"=dword:00000001 sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender" "DisableRoutinelyTakingAction" 1
"DisableRoutinelyTakingAction"=dword:00000001 mkdir -Force "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection"
sp "HKLM:\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection" "DisableRealtimeMonitoring" 1
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Policy Manager]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows Defender\Real-Time Protection]
"DisableRealtimeMonitoring"=dword:00000001
"@)

Loading…
Cancel
Save