Skip to content

Instantly share code, notes, and snippets.

@lorenadl
Last active October 26, 2021 17:15
Show Gist options
  • Save lorenadl/8b117f1a1bef46aad23e5b5f021ea8ea to your computer and use it in GitHub Desktop.
Save lorenadl/8b117f1a1bef46aad23e5b5f021ea8ea to your computer and use it in GitHub Desktop.
Enabling and disabling Hyper V Docker

How I can turn off HyperV Container features so that I can use Virtual Box and then turn them back on to use Docker for Windows

Source: https://stackoverflow.com/questions/47081205/simple-instructions-needed-for-enabling-and-disabling-hyper-v-docker

You can do below to disable:

dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
bcdedit /set hypervisorlaunchtype off

and below to enable:

dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
bcdedit /set hypervisorlaunchtype auto 

From PowerShell (execute with admin priviledges):

To Disable:

Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

To Enable:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V –All

To test status:

Get-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

Note that you have to restart the system.

PS: Source threads: https://superuser.com/questions/540055/convenient-way-to-enable-disable-hyper-v-in-windows-8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment