windows没有Hyper-V的解决办法(There is no Hyper-V solution for windows)

1.将如下代码添加到记事本中,并另存为Hyper-V.cmd文件。代码如下:

pushd “%~dp0”

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt

for /f %%i in (‘findstr /i . hyper-v.txt 2^>nul’) do dism /online /norestart /add-package:”%SystemRoot%\servicing\Packages\%%i”

del hyper-v.txt

Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

2.桌面上,我们找到并右键点击【Hyper-V.cmd】文件图标,在右键菜单中点击:以管理员身份运行

3.然后弹出一个 用户帐户控制 – Windows命令处理程序 对话框,我们点击:是。

4.然后系统自动进行Windows命令处理,我们等待处理完成以后,在最末处输入:Y,电脑自动重启,进行配置更新。

重启后可以在“打开或关闭windows功能”里看到已经Hyper-V已经安装并打上勾了。

————————

1. Add the following code to Notepad and save it as hyper-v.cmd file. The code is as follows:

pushd “%~dp0”

dir /b %SystemRoot%\servicing\Packages\*Hyper-V*.mum >hyper-v.txt

for /f %%i in (‘findstr /i . hyper-v.txt 2^>nul’) do dism /online /norestart /add-package:”%SystemRoot%\servicing\Packages\%%i”

del hyper-v.txt

Dism /online /enable-feature /featurename:Microsoft-Hyper-V-All /LimitAccess /ALL

2. On the desktop, we find and right-click the [hyper-v.cmd] file icon, and click: run as administrator in the right-click menu

3. Then a user account control – Windows command handler dialog box pops up, and we click: Yes.

4. Then the system automatically processes the windows command. After we wait for the processing to be completed, we enter: y at the end, and the computer will restart automatically to update the configuration.

After restart, you can see that Hyper-V has been installed and checked in “turn on or off windows functions”.