How to disable Hyper-V in command line?

WindowsCmdHypervisor

Windows Problem Overview


I'm trying to open VMware, it says that VMware player and Hyper-V are not compatible. I found it here, but it's not working using the command it offers.

I tried to see the help, found that there's /hypervisorsettings option there. But still not work with it, it says The parameter is incorrect.

Can anyone help with this?

Windows Solutions


Solution 1 - Windows

In an elevated Command Prompt write this :

To disable:

bcdedit /set hypervisorlaunchtype off

To enable:

bcdedit /set hypervisorlaunchtype auto 

(From comments - restart to take effect)

Solution 2 - Windows

You can have a Windows 10 configuration with and without Hyper-V as follows in an Admin prompt:

bcdedit /copy {current} /d "Windows 10 no Hyper-V"

find the new id of the just created "Windows 10 no Hyper-V" bootentry, eg. {094a0b01-3350-11e7-99e1-bc5ec82bc470}

bcdedit /set {094a0b01-3350-11e7-99e1-bc5ec82bc470} hypervisorlaunchtype Off

After rebooting you can choose between Windows 10 with and without Hyper-V at startup

Solution 3 - Windows

This command works

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

Run it then agree to restart the computer when prompted.

I ran it in elevated permissions PowerShell on Windows 10, but it should also work on Win 8 or 7.

Solution 4 - Windows

Command line:

dism /online /disable-feature /featurename:microsoft-hyper-v-all

If anyone is getting:

> We couldn’t complete the updates, Undoing changes

after trying to disable the Hyper-V, try uninstalling Hyper-V virtual network adapters from your Device Manager->Network Adapters

Solution 5 - Windows

Open a command prompt as admin and run this command:

bcdedit /set {current} hypervisorlaunchtype off

After a reboot, Hyper-V is still installed but the Hypervisor is no longer running. Now you can use VMware without any issues.

If you need Hyper-V again, open a command prompt as admin and run this command:

bcdedit /set {current} hypervisorlaunchtype auto

Solution 6 - Windows

The OP had the best answer for me and it appears that others have figured out the -All addition as well. I set up two batch files, then shortcuts to those so you can set the Run As Admin permissions on them, easy-peasy.

Batch Off

Call dism.exe /Online /Disable-Feature:Microsoft-Hyper-V-All

Batch On

Call dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

Right-click -> create desktop shortcut. Right-click the shortcut -> properties -> under the shortcut tab -> Advanced -> Run as admin

Solution 7 - Windows

Open command prompt as admin and write :

bcdedit /set hypervisorlaunchtype off

Solution 8 - Windows

This is not a direct answer to the OP's question, but if you have tried all the commands and Hyper-V shows as disabled, BUT still unable to start a virtualisation software like VirtualBox or VMWare and just so it happened that you had enabled WSL2 on your machine

Following solution might will work for you.

Go to Control Panel > Programs & Features > Turn Windows Feature On/OFF

Here is the catch, All the three below should be disabled/unchecked.

  • Virtual Machine Platform
  • Windows Hypervisor Platform
  • Windows Subsystem for Linux

Restart!

Solution 9 - Windows

you can use my script. paste code lines to notepad and save as vbs(for example switch_hypervisor.vbs)

Option Explicit

Dim backupfile
Dim record
Dim myshell
Dim appmyshell
Dim myresult
Dim myline
Dim makeactive
Dim makepassive
Dim reboot
record=""
Set myshell = WScript.CreateObject("WScript.Shell")

If WScript.Arguments.Length = 0 Then
	Set appmyshell  = CreateObject("Shell.Application")
	appmyshell.ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ RunAsAdministrator", , "runas", 1
	WScript.Quit
End if




Set backupfile = CreateObject("Scripting.FileSystemObject")
If Not (backupfile.FileExists("C:\bcdedit.bak")) Then
	Set myresult = myshell.Exec("cmd /c bcdedit /export c:\bcdedit.bak")
End If

Set myresult = myshell.Exec("cmd /c bcdedit")
Do While Not myresult.StdOut.AtEndOfStream
	myline = myresult.StdOut.ReadLine()

	If myline="The boot configuration data store could not be opened." Then
		record=""
		exit do
	End If
	If Instr(myline, "identifier") > 0 Then
		record=""
		If Instr(myline, "{current}") > 0 Then
			record="current"
		End If
	End If
	If Instr(myline, "hypervisorlaunchtype") > 0 And record = "current" Then
		If Instr(myline, "Auto") > 0 Then
			record="1"
			Exit Do
		End If
		If Instr(myline, "On") > 0 Then
			record="1"
			Exit Do
		End If
		If Instr(myline, "Off") > 0 Then
			record="0"
			Exit Do
		End If
	End If
Loop

If record="1" Then
	makepassive = MsgBox ("Hypervisor status is active, do you want set to passive? ", vbYesNo, "Hypervisor")
	Select Case makepassive
	Case vbYes
		myshell.run "cmd.exe /C  bcdedit /set hypervisorlaunchtype off"
		reboot = MsgBox ("Hypervisor chenged to passive; Computer must reboot. Reboot now? ", vbYesNo, "Hypervisor")
		Select Case reboot
			Case vbYes
				myshell.run "cmd.exe /C  shutdown /r /t 0"
		End Select
	Case vbNo
		MsgBox("Not Changed")
	End Select
End If

If record="0" Then
	makeactive = MsgBox ("Hypervisor status is passive, do you want set active? ", vbYesNo, "Hypervisor")
	Select Case makeactive
	Case vbYes
		myshell.run "cmd.exe /C  bcdedit /set hypervisorlaunchtype auto"
		reboot = MsgBox ("Hypervisor changed to active;  Computer must reboot. Reboot now?", vbYesNo, "Hypervisor")
		Select Case reboot
			Case vbYes
				myshell.run "cmd.exe /C  shutdown /r /t 0"
		End Select
	Case vbNo
		MsgBox("Not Changed")
	End Select
End If

If record="" Then
		MsgBox("Error: record can't find")
End If

Solution 10 - Windows

I tried all of stack overflow and all didn't works. But this works for me:

  1. Open System Configuration
  2. Click Service tab
  3. Uncheck all of Hyper-V related

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionSkyView Question on Stackoverflow
Solution 1 - WindowsLukeSkCzEnDeRuPlView Answer on Stackoverflow
Solution 2 - WindowshfmansonView Answer on Stackoverflow
Solution 3 - WindowsDivineOpsView Answer on Stackoverflow
Solution 4 - WindowsIgnas VyšniaView Answer on Stackoverflow
Solution 5 - WindowsIasmini GomesView Answer on Stackoverflow
Solution 6 - WindowsBob PhrapplesView Answer on Stackoverflow
Solution 7 - WindowsFodor CodrutView Answer on Stackoverflow
Solution 8 - WindowsMohd Abdul MujibView Answer on Stackoverflow
Solution 9 - WindowsteknokadimView Answer on Stackoverflow
Solution 10 - WindowsYehezkiel LView Answer on Stackoverflow