Created
August 12, 2016 10:39
-
-
Save iscgar/3f3075647536dacc325cf29942e1ecc3 to your computer and use it in GitHub Desktop.
Turns Hyper-V off
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
@echo off | |
if "%1" == "" (set "BCDREC={current}") else (set "BCDREC=%1") | |
echo Setting Hyper-V off for %BCDREC%... | |
bcdedit /set %BCDREC% hypervisorlaunchtype off | |
if errorlevel 1 (goto fail) | |
echo. | |
echo Rebooting into No Hyper-V Mode | |
echo ============================== | |
echo Press any key to restart or CTRL-C to restart manually | |
pause | |
shutdown /r /t 0 /d p:0:0 | |
exit /b | |
:fail | |
echo Failed to turn Hyper-V off |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment