Skip to content

Commit 9f282c8

Browse files
committed
Merge remote-tracking branch 'ArrayBolt3/arraybolt3/hyper-v-disable'
2 parents 1913577 + 4c479f3 commit 9f282c8

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

DisableHyperV.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bcdedit /set hypervisorlaunchtype off
2+
dism /Online /Disable-Feature:Microsoft-Hyper-V /NoRestart
3+
dism /Online /Disable-Feature:HypervisorPlatform /NoRestart
4+
dism /Online /Disable-Feature:VirtualMachinePlatform /NoRestart
5+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity /v Enabled /t REG_DWORD /d 0 /f
6+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity /v WasEnabledBy /t REG_DWORD /d 2 /f
7+
reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard /v EnableVirtualizationBasedSecurity /f
8+
reg delete HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard /v RequirePlatformSecurityFeatures /f
9+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa /v LsaCfgFlags /t REG_DWORD /d 0 /f
10+
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeviceGuard /v LsaCfgFlags /t REG_DWORD /d 0 /f

UndoDisableHyperV.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
bcdedit /set hypervisorlaunchtype auto
2+
dism /Online /Enable-Feature:HypervisorPlatform /NoRestart
3+
dism /Online /Enable-Feature:VirtualMachinePlatform /NoRestart
4+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity /v Enabled /t REG_DWORD /d 1 /f
5+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity /v WasEnabledBy /t REG_DWORD /d 2 /f
6+
reg add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 1 /f

0 commit comments

Comments
 (0)