如何在命令行中禁用Hyper-V?

我试图打开VMware,它说,VMware播放器和Hyper-V不兼容。 我发现它在这里 ,但它不能使用它提供的命令。

我试图看到帮助,发现那里有/hypervisorsettings选项。 但仍然不能用,它说The parameter is incorrect

有人能帮忙吗?

提升的命令提示符下写这个:

禁用:

 bcdedit /set hypervisorlaunchtype off 

启用:

 bcdedit /set hypervisorlaunchtype auto 

(从评论 – 重新启动生效)

这个命令起作用

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

运行它,然后同意在出现提示时重新启动计算机。

我在Windows 10上使用提升的权限PowerShell运行它,但它也应该在Win 8或7上运行。

命令行:

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

如果有人得到:

我们无法完成更新,撤消更改

尝试禁用Hyper-V后,尝试从设备管理器 – >网络适配器中卸载Hyper-V虚拟网络适配器

在管理提示符下,您可以使用或不使用Hyper-V来配置Windows 10配置:

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

找到刚创建的“Windows 10 no Hyper-V”引导入口的新ID,例如。 {094a0b01-3350-11e7-99e1-bc5ec82bc470}

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

重新启动后,您可以在启动时选择带有或不带有Hyper-V的Windows 10

你可以使用我的脚本。 将代码行粘贴到记事本并保存为vbs(例如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