解决Windows Server 2012 Core 0x800f0906报错

本篇将介绍如何解决Windows Server 2012 Core 的0x800f0906报错。

当你在使用Windows Server 2012 Core的时候,往往可能需要用到GUI界面来解决和调试设置。

但当你在使用Add-WindowsFeature的时候, 往往会得到以下报错:

Add-WindowsFeature : The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be downloaded.
Use the “source” option to specify the location of the files that are required to restore the feature. For more
information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f0906
At line:1 char:1
+ Add-WindowsFeature Server-Gui-Mgmt-Infra
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (@{Vhd=; Credent…Name=localhost}:PSObject) [Install-WindowsFeature],
Exception
+ FullyQualifiedErrorId : DISMAPI_Error__Cbs_Download_Failure,Microsoft.Windows.ServerManager.Commands.AddWindowsF
eatureCommand

解决方案很简单,你只需要在你的PC或者虚拟机内插入或加载上Windows Server 2012的光盘或iso文件,然后在Powershell中输入以下命令:

Add-WindowsFeature Server-Gui-Mgmt-Infra –Source wim:E:Sourcesinstall.wim:4 –Restart

服务器重启后,GUI界面就会展现出来,你可以通过GUI界面来添加或删除Roles和Features。