Skip to content

Instantly share code, notes, and snippets.

@jquintus
Created November 11, 2014 18:26
Show Gist options
  • Select an option

  • Save jquintus/b9ad19e94b3842b0d15e to your computer and use it in GitHub Desktop.

Select an option

Save jquintus/b9ad19e94b3842b0d15e to your computer and use it in GitHub Desktop.
Disable Hyper-V
# This script makes a copy of the current boot record and disables Hyper-V
# The next time the computer is restarted you can elect to run without Hyper-V
$output = invoke-expression 'bcdedit /copy "{current}" /d "Hyper-V Disabled"'
$output -match '{.*}'
$guid = $matches[0]
$hyperVCommand = 'bcdedit /set "' + $guid + '" hypervisorlaunchtype off'
invoke-expression $hyperVCommand
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment