通过命令来启用 Hyper-V报错

通过命令来启用 Hyper-V ,请右键开始菜单并以管理员身份运行 PowerShell,执行以下命令:

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


PS C:\Users\flyer> Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All                            Enable-WindowsOptionalFeature : 功能名称 Microsoft-Hyper-V 未知。
所在位置 行:1 字符: 1
+ Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V  ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Enable-WindowsOptionalFeature], COMException
    + FullyQualifiedErrorId : Microsoft.Dism.Commands.EnableWindowsOptionalFeatureCommand

控制面板中开启hyper-V。

img