{"id":345,"date":"2023-06-17T15:05:23","date_gmt":"2023-06-17T07:05:23","guid":{"rendered":"https:\/\/www.gzlcy.cn\/?p=345"},"modified":"2023-06-17T15:05:23","modified_gmt":"2023-06-17T07:05:23","slug":"%e4%bd%bf%e7%94%a8-powershell-%e5%90%af%e7%94%a8-hyper-v","status":"publish","type":"post","link":"http:\/\/www.gzlcy.cn\/?p=345","title":{"rendered":"\u4f7f\u7528 PowerShell \u542f\u7528 Hyper-V"},"content":{"rendered":"<p>\u672c\u6587\u5185\u5bb9<\/p>\n<p>\u542f\u7528 Hyper-V \u4ee5\u5728 Windows 10 \u4e0a\u521b\u5efa<a href='https:\/\/www.gzlcy.cn\/?p=276' title='\u865a\u62df\u673a' target='_blank' rel=\"noopener\">\u865a\u62df\u673a<\/a>\u3002<\/p>\n<p>\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u5f0f\u542f\u7528 Hyper-V\uff0c\u5305\u62ec\u4f7f\u7528 Windows 10 \u63a7\u5236\u9762\u677f\u3001PowerShell \u6216\u4f7f\u7528\u90e8\u7f72\u6620\u50cf\u670d\u52a1\u548c\u7ba1\u7406\u5de5\u5177 (DISM)\u3002 \u672c\u6587\u6863\u5c06\u9010\u4e00\u4ecb\u7ecd\u6bcf\u4e2a\u9009\u9879\u3002<\/p>\n<p>\u6ce8\u610f\uff1aHyper-V \u4f5c\u4e3a\u53ef\u9009\u529f\u80fd\u5185\u7f6e\u4e8e Windows &#8212; \u65e0\u9700\u4e0b\u8f7d Hyper-V\u3002<\/p>\n<p>\u68c0\u67e5\u8981\u6c42<\/p>\n<p>\u8bf7\u52ff\u5728 Windows 10 \u5bb6\u5ead\u7248\u4e0a\u5b89\u88c5 Hyper-V \u89d2\u8272\u3002<\/p>\n<p>\u6253\u5f00\u201c\u8bbe\u7f6e\u201d&gt;\u201c\u66f4\u65b0\u548c\u5b89\u5168\u201d&gt;\u201c\u6fc0\u6d3b\u201d\uff0c\u4ece Windows 10 \u5bb6\u5ead\u7248\u5347\u7ea7\u5230 Windows 10 \u4e13\u4e1a\u7248\u3002<\/p>\n<p>\u6709\u5173\u8be6\u7ec6\u4fe1\u606f\u548c\u7591\u96be\u89e3\u7b54\uff0c\u8bf7\u53c2\u9605 Windows 10 Hyper-V \u7cfb\u7edf\u8981\u6c42\u3002<\/p>\n<p>\u4f7f\u7528 PowerShell \u542f\u7528 Hyper-V<\/p>\n<p>\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u6253\u5f00 PowerShell \u63a7\u5236\u53f0\u3002<\/p>\n<p>\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><pre><code class=\"lang-powershell\">Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All\n<\/code><\/pre>\n<\/p>\n<p>\u5982\u679c\u65e0\u6cd5\u627e\u5230\u6b64\u547d\u4ee4\uff0c\u8bf7\u786e\u4fdd\u4f60\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c PowerShell\u3002<\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u8bf7\u91cd\u542f\u3002<\/p>\n<p>\u4f7f\u7528 CMD \u548c DISM \u542f\u7528 Hyper-V<\/p>\n<p>\u90e8\u7f72\u6620\u50cf\u670d\u52a1\u548c\u7ba1\u7406\u5de5\u5177 (DISM) \u53ef\u5e2e\u52a9\u914d\u7f6e Windows \u548c Windows \u6620\u50cf\u3002  \u5728\u4f17\u591a\u5e94\u7528\u7a0b\u5e8f\u4e2d\uff0cDISM \u53ef\u4ee5\u5728\u64cd\u4f5c\u7cfb\u7edf\u8fd0\u884c\u65f6\u542f\u7528 Windows \u529f\u80fd\u3002<\/p>\n<p>\u4f7f\u7528 DISM \u542f\u7528 Hyper-V \u89d2\u8272\uff1a<\/p>\n<p>\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u6253\u5f00 PowerShell \u6216 CMD \u4f1a\u8bdd\u3002<\/p>\n<p>\u952e\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<p><pre><code class=\"lang-powershell\">DISM \/Online \/Enable-Feature \/All \/FeatureName:Microsoft-Hyper-V\n<\/code><\/pre>\n<\/p>\n<p><img src='https:\/\/learn.microsoft.com\/zh-cn\/virtualization\/hyper-v-on-windows\/quick-start\/media\/dism_upd.png' alt='Console window showing Hyper-V being enabled.' \/><\/p>\n<p>\u6709\u5173 DISM \u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u8bf7\u53c2\u9605 DISM \u6280\u672f\u53c2\u8003\u3002<\/p>\n<p>\u901a\u8fc7\u201c\u8bbe\u7f6e\u201d\u542f\u7528 Hyper-V \u89d2\u8272<\/p>\n<p>\u53f3\u952e\u5355\u51fb Windows \u6309\u94ae\u5e76\u9009\u62e9\u201c\u5e94\u7528\u548c\u529f\u80fd\u201d\u3002<\/p>\n<p>\u9009\u62e9\u76f8\u5173\u8bbe\u7f6e\u4e0b\u53f3\u4fa7\u7684\u201c\u7a0b\u5e8f\u548c\u529f\u80fd\u201d\u3002<\/p>\n<p>\u9009\u62e9\u201c\u6253\u5f00\u6216\u5173\u95ed Windows \u529f\u80fd\u201d\u3002<\/p>\n<p>\u9009\u62e9\u201cHyper-V\u201d\uff0c\u7136\u540e\u5355\u51fb\u201c\u786e\u5b9a\u201d\u3002<\/p>\n<p><img src='https:\/\/learn.microsoft.com\/zh-cn\/virtualization\/hyper-v-on-windows\/quick-start\/media\/enable_role_upd.png' alt='Windows programs and features dialogue box' \/><\/p>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u7cfb\u7edf\u4f1a\u63d0\u793a\u4f60\u91cd\u65b0\u542f\u52a8\u8ba1\u7b97\u673a\u3002<\/p>\n<p>\u521b\u5efa\u865a\u62df\u673a<\/p>\n<p>\u521b\u5efa\u4f60\u7684\u7b2c\u4e00\u4e2a\u865a\u62df\u673a<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728 Windows 10 \u4e0a\u5b89\u88c5 Hyper-V<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[682,683,536],"_links":{"self":[{"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=\/wp\/v2\/posts\/345"}],"collection":[{"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=345"}],"version-history":[{"count":0,"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=\/wp\/v2\/posts\/345\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gzlcy.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}