Windows 10 如何使用Windows PowerShell启用Hyper-V?

Windows 10 如何使用Windows PowerShell启用Hyper-V?,windows-10,hyper-v,Windows 10,Hyper V,我试过这个命令: Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All 但是,它会给我以下反馈信息: 'Enable-WindowsOptionalFeature' is not recognized as an internal or external command, operable program or batch file. 改为尝试DISM: DISM/联机/启用功能/全部/功能名称:M

我试过这个命令:

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All
但是,它会给我以下反馈信息:

'Enable-WindowsOptionalFeature' is not recognized as an internal or external command,
operable program or batch file.
改为尝试DISM:
DISM/联机/启用功能/全部/功能名称:Microsoft-Hyper-V


查看更多安装信息。

我想您已经找到了答案,但我是为下一代编写的)只需以管理员身份运行powershell console即可。我不是考古学家,我只是在寻找用于启用hyper-v的字符串。

将此用作帮助:谢谢,莎拉。唯一对我有效的解决方案。99%的其他解决方案要求您在BIOS中打开它,或在“打开Windows功能打开/关闭”中打开它,但在Powershell中运行此命令是唯一使hyper-v重新打开的方法。