Win10上禁用Device Guard以便运行VMware

Win10上每次大版本升级后,如果你试图运行VMware,都会提示如下的错误信息:

“VMware Workstation 与 Device/Credential Guard 不兼容。在禁用 Device/Credential Guard 后,可以运行 VMware Workstation。有关更多详细信息,请访问 http://www.vmware.com/go/turnoff_CG_DG。”

最近Win10的2004版本的ISO放出,我又遇到了这个问题,幸好之前做了笔记,不然又没法跑VMware了。

打开VMware提示中的链接,最终会被导引到微软自家的网站上,具体位置是 Manage Windows Defender Credential Guard。但微软这个页面中的文档有点糟糕,不少人针对其中的bug提了issue,它也没改好,比较折腾人。

下面直接给出我折腾通过的办法:

1、在微软的上述页面中下载那个PowerShell脚本:HVCI and Windows Defender Credential Guard hardware readiness tool。

2、以管理员权限打开一个cmd.exe的命令行窗口,执行powershell.exe,进入PowerShell的命令行。在PowerShell的提示符下执行如下命令,忽略任何红色的错误信息:

Set-ExecutionPolicy -ExecutionPolicy Unrestricted
.\DG_Readiness_Tool_v3.6.ps1 -Disable
exit

3、在上述cmd.exe的命令行窗口中执行如下命令(第二条命令可能报错,说项目已经存在。直接忽略这个错误):

copy %WINDIR%\System32\SecConfig.efi E:\EFI\Microsoft\Boot\SecConfig.efi /Y
bcdedit /create {0cb3b571-2f2e-4343-a879-d86a476d7215} /d "DebugTool" /application osloader
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} path "\EFI\Microsoft\Boot\SecConfig.efi"
bcdedit /set {bootmgr} bootsequence {0cb3b571-2f2e-4343-a879-d86a476d7215}
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} loadoptions DISABLE-LSA-ISO,DISABLE-VBS
bcdedit /set {0cb3b571-2f2e-4343-a879-d86a476d7215} device partition=E:
bcdedit /set hypervisorlaunchtype off

4、重启Win10。如果开机菜单出现提示禁用Device/Credential Guard,确认即可。

参考:

https://github.com/MicrosoftDocs/windows-itpro-docs/issues/2569

猜你喜欢

转载自www.cnblogs.com/z16166/p/12894041.html
今日推荐