152

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?

2
  • 5
    I found a working way here: dism.exe /Online /Disable-Feature:Microsoft-Hyper-V and dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All, but still don't know how bcdedit works.
    – Sky
    Commented May 28, 2015 at 3:46
  • this link (pswalia2u.medium.com/…) worked for me. For enterprise users, this solution will trigger BitLocker during restart, be aware!
    – user10838321
    Commented Feb 24, 2021 at 6:24

12 Answers 12

364

In an elevated Command Prompt write this :

To disable:

bcdedit /set hypervisorlaunchtype off

To enable:

bcdedit /set hypervisorlaunchtype auto 

Restart to take effect.

6
  • I even forgot this question. I used this actually back then, but it didn't work. Anyway, it works now. Thanks.
    – Sky
    Commented Mar 7, 2016 at 1:10
  • 5
    In case you don't specifically need a command line solution but rather just something really simple and quick, you might use my tool Hyper-V Switch that uses the bcdedit method internally and puts a one-click GUI over it. Works on my Windows 10 computer.
    – ygoe
    Commented Apr 25, 2016 at 18:20
  • Worked fine on Windows 10 1607
    – Quanlong
    Commented Dec 6, 2017 at 5:58
  • Worked on Win 10 (1803), though i had to reboot twice somehow. Commented Sep 29, 2018 at 6:52
  • For me that did not work even after also uninstalling Hyper-V in windows features. I also had to uninstall Internet Explorer 11 in windows features.
    – Dennis
    Commented Aug 15, 2019 at 9:57
45

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.

To find the new id, type "bcdedit" and then look for identifier {XXX} in the added boot loader configuration. 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

1
  • 2
    If you run this command on PowerShell, make sure to put the {current} and {GUID} between " " like: "{current}" Commented Oct 21, 2019 at 14:34
31

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.

4
  • 3
    Is there any way to achieve this without a reboot?
    – rustyx
    Commented Mar 7, 2017 at 13:52
  • And what about re-enabling Hyper-V again via cmd? Thank you! Commented Mar 7, 2017 at 16:36
  • 6
    This command fully removes HyperV feature with it's files and programs. The bcdedit command is best to disable it and run VirtualBox or VMware instead of it.
    – user8350477
    Commented Aug 11, 2017 at 8:01
  • My Hyper-V installation decided to give up on me for no reason (i’m running Windows 10 Pro v1703 build 15063.786). I’ve tried to (un/re)install it via Windows Features menu, Powershell and DISM. They all gave no error but as soon as i try to create/add a new VM, and want to finish the last step, Hyper-V throws an error that it couldn’t open/access something because an object doesn’t appear to exist (dutch screenshot): i.imgur.com/07hem57.png Same story when running it with elevated/admin privileges. Apparently its not possible to fully restore/repair the Hyper-V product/modules... Commented Dec 25, 2017 at 21:32
20

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

3
  • This causes windows update fails, thanks for the info
    – Benny
    Commented Jul 12, 2019 at 1:18
  • well it bypassed the windows update failing part for me
    – Ikhlak S.
    Commented Nov 29, 2020 at 23:45
  • thanks, it worked while repairing windows from the command line
    – Ghafoor
    Commented Feb 24, 2022 at 12:01
8

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
2
  • 2
    Is there any difference/advantage in using bcdedit /set {current} ... over bcdedit /set ...?
    – mwfearnley
    Commented Jan 30, 2020 at 10:45
  • Now Windows 10 hung up on boot as a result of this command. What should I do ? Commented Nov 9, 2021 at 23:36
4

Open command prompt as admin and write :

bcdedit /set hypervisorlaunchtype off
1
  • Now Windows 10 hung up on boot as a result of this command. What should I do ? Commented Nov 9, 2021 at 23:35
3

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

1

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
2
  • 2
    Normally, one should attempt to explain what a code snippet does/how it works when answering a question. Commented Jul 18, 2017 at 9:34
  • 1
    @SebastianLenartowicz looks self-explanatory to me. The script will just set the hypervisorlaunchtype to auto or off and also export current settings through the bcdedit command.
    – user797717
    Commented Oct 18, 2017 at 9:38
1

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!

0

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
0

I found the perfect solution on https://www.interfacett.com/blogs/enabling-hypervisor-auto-start-boot-configuration-database-bcd/

It wasn't working with given commands. But when you go to Power Shell and use command CMD then enter on or off with bcdedit /set {current} hypervisorlaunchtype [off or on chose any] then it worked without any issue.

1
  • 1
    While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – kjlubick
    Commented May 30, 2022 at 20:33
0

I solved it in the following way:

1. bcdedit /set hypervisorlaunchtype off enter image description here

result [FAILED!]

2. bcdedit /set {872da645-4a9b-1727-bee2-5585105b9eed} hypervisorlaunchtype Off

enter image description here

result [FAILED!]

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

enter image description here

result [FAILED!]

The error is that I am not logged in as an administrator at the command prompt as a result all the steps above [FAIL!]

it should be like this:

1. open windows search enter image description here

2. search cmd enter image description here

3. Right click on Command Prompt enter image description here

4. Click run as administrator

5. type in cmd bcdedit /set hypervisorlaunchtype off enter image description here

and see already [SUCCESSFUL√]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.