服务器核心转换为完全安装(GUI

我们在安装Windows Server2012 Windows Server 2012 R2时可能会由于疏忽大意选择安装了Server Core 版本。安装完成又对命令操作模式不是非常熟悉。操作不便、影响工作效率。为解决此问题,可能会选择重新安装操作系统来解决,但是重新安装操作系统费时费力。对此我们完全可以通过Add-WindowsFeature install-WindowsFeature 来为Server core 安装GUI图形化界面。

 

一、为Windows Core 安装图形化界面

 

  1. 安装完Server Core 进入操作系统会进入命令提示符,在此我们输入“Powershell,如图

                             Windows Server Core 转换为完全安装(GUI)_False

2. 进入PS模式后,我们输入Get-WindowsFeature –name *GUI* | ft name, installed 来查看Server-Gui-Mgmt-InfraServer-Gui-Shell 两个功能的安装情况。如图

Windows Server Core 转换为完全安装(GUI)_Windows_02

 

3. 通过上述查询,我们看到两个功能的安装状态均为False. 表示两个功能未安装。

我们可以通过Add-WindowsFeature Server-Gui-Mgmt-Infra ,Server-Gui-Shell –Restart

Install-WindowsFeature Server-Gui-Mgmt-Infra ,Server-Gui-Shell–Restart 来安装。

Windows Server Core 转换为完全安装(GUI)_操作系统_03

4. 已经开始安装,如图

Windows Server Core 转换为完全安装(GUI)_Windows_04

 3. 或运行Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell Restart,如图

Windows Server Core 转换为完全安装(GUI)_服务器_05

 4. 运行运行Install-WindowsFeature 开始安装。如图 

Windows Server Core 转换为完全安装(GUI)_Windows_06

5. 安装完成,重启进入系统,可以看到GUI 图像化界面。

Windows Server Core 转换为完全安装(GUI)_Windows_07


二、 删除GUI 图形化界面转化为ServerCore

    有些比较牛X 的人对Server Core命令玩的比较熟悉,不喜欢使用图形化界面。我们也可以可以通过删除、卸载Windows 功能中的“用户界面和基础架构”来实现将Windows 完全安装转化为Windows 核心的目的。

 

  1. 运行Get-WindowsFeature –name *GUI* 来查看“图形管理工具和基础架构”和“服务器图形Shell ”的安装状态为Installed.

  2. 运行 UnInstall-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell Restart

运行Remove-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell Restart ,如图

Windows Server Core 转换为完全安装(GUI)_服务器_08

3. 开始删除相关功能。

Windows Server Core 转换为完全安装(GUI)_操作系统_09

2 . 通过运行UnInstall-WindowsFeature 来删除相关功能。

Windows Server Core 转换为完全安装(GUI)_False_10

   上述仅针对安装操作系统时使用的非Server Core 版本的系统镜像,由于疏忽大意导致安装成为Server Core版本的情形;如果安装系统时直接选用了Server Core版本的系统镜像,需要转化为GUI 图形化界面则相对比较复杂。

1.使用此 cmdlet 确定完全安装映像的索引编号:Get-WindowsImage -ImagePath <path to wim>\install.wim

2.运行Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell Restart Sourcewim:< D:\sources>\install.wim:<Index # from step 1>

3.或者使用 Windows 更新而不是某个 WIM 文件作为源,用以下Windows PowerShell cmdlet

Install-WindowsFeature Server-Gui-Mgmt-Infra,Server-Gui-Shell–Restart