powershell 通过Powershell禁用/启用Hyper-V(“以管理员身份运行”)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了powershell 通过Powershell禁用/启用Hyper-V(“以管理员身份运行”)相关的知识,希望对你有一定的参考价值。

# Remember, all of these commands need executed via Powershell that is started/opened with "Run As Administrator".

# Disabling Hyper-V

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

# Enabling Hyper-V

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

# You may also want DSIM enabled with all this, here's that detail.

DISM /Online /Enable-Feature /All /FeatureName:Microsoft-Hyper-V

以上是关于powershell 通过Powershell禁用/启用Hyper-V(“以管理员身份运行”)的主要内容,如果未能解决你的问题,请参考以下文章