echo step1
dism /Online /Disable-Feature:microsoft-hyper-v-all /NoRestart
echo step2
dism /Online /Disable-Feature:IsolatedUserMode /NoRestart
echo ste3
dism /Online /Disable-Feature:Microsoft-Hyper-V-Hypervisor /NoRestart
echo ste4
dism /Online /Disable-Feature:Microsoft-Hyper-V-Online /NoRestart
echo step5
dism /Online /Disable-Feature:HypervisorPlatform /NoRestart

echo step6
mountvol X: /s
echo step7
copy %WINDIR%\System32\SecConfig.efi X:\EFI\Microsoft\Boot\SecConfig.efi /Y

echo step8
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
echo step9
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
echo step10
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
echo step11
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
echo step12
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=X:

echo step13
mountvol X: /d

echo step14
bcdedit /set hypervisorlaunchtype off

echo step15 [Disable HVCI]
reg add "HKLM\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\HypervisorEnforcedCodeIntegrity" /v "Enabled" /t REG_DWORD /d 0 /f
echo done.
