如何将 Windows GUI 添加到 Windows 2016 Server Core?

Som*_*ial 29 powershell windows-server-core windows-server-2016

我们刚刚从 Rackspace 获得了我们的专用服务器。它上面装有W2008。我决定将最新的操作系统放在上面,这样我以后就不必升级了。显然在安装过程中,我选择了 no gui 选项。

我试图从我在其他网站上看到的参考的 powershell 安装 gui。

例如:

Install-WindowsFeature Server-GUI-Shell -Restart
Run Code Online (Sandbox Code Playgroud)

当我运行它时,我收到以下错误:

PS C:\> Install-WindowsFeature Server-GUI-Shell -Restart
Install-WindowsFeature : ArgumentNotValid: The role, role service, or feature name is not valid: 'Server-GUI-Shell'.
The name was not found.
At line:1 char:1
+ Install-WindowsFeature Server-GUI-Shell -Restart
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Server-GUI-Shell:String) [Install-WindowsFeature], Exception
    + FullyQualifiedErrorId : NameDoesNotExist,Microsoft.Windows.ServerManager.Commands.AddWindowsFeatureCommand

Success Restart Needed Exit Code      Feature Result
------- -------------- ---------      --------------
False   No             InvalidArgs    {}
Run Code Online (Sandbox Code Playgroud)

我似乎无法弄清楚如何在此服务器上安装 gui。

我见过的所有安装 gui 的参考都说要使用 Server-GUI-Shell。

有人有什么建议吗?

Mat*_*ore 54

它不再可以从服务器核心切换到Versa在服务器2016年完整的GUI或副-无论是通过服务器管理器,PowerShellDISM。您必须在安装时最初做出选择。来自TechNet

与某些以前版本的 Windows Server 不同,您无法在安装后在 Server Core 和 Server with Desktop Experience 之间进行转换。例如,如果您安装了 Server Core,然后决定使用具有桌面体验的 Server,您应该进行全新安装(反之亦然)。

关于该主题的优秀社区文章:https : //superwidgets.wordpress.com/2016/10/29/windows-server-2016-gui-options/

Server 2012 和 Server 2012 R2 中存在通过服务器管理器和 Install/Remove-WindowsFeature cmdlet 从一种转换到另一种的功能。

  • 微软网站上也提到过。[来源](https://blogs.technet.microsoft.com/windowsserver/2017/04/05/switching-between-windows-server-2016-server-core-and-desktop-experience/) > `我们优先考虑一致性使用 Windows 客户端桌面通过 > 在 Server Core 和 Server with Desktop 之间切换的能力。> 用 Windows 10 桌面替换 Server 中的旧桌面 > 经验导致我们无法支持 Windows Server > 2012 R2 行为。` (2认同)