博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何在Windows Server 2012中关闭和打开GUI
阅读量:2527 次
发布时间:2019-05-11

本文共 4239 字,大约阅读时间需要 14 分钟。

image

When Server Core originally shipped, a lot of Windows admins avoided it because you could only use the command line, but this changes with Windows Server 2012 which enabled the use of a hybrid mode.

最初提供Server Core时,许多Windows管理员避免使用它,因为您只能使用命令行,但是Windows Server 2012的情况发生了变化,启用了混合模式。

关闭GUI (Turning the GUI Off)

In Windows Server 8 the GUI has kept with the modular nature of recent Windows Server Operating Systems and in turn has become a “Feature”. This makes removing the GUI very easy. To get started launch Server Manager.

在Windows Server 8中,GUI保持了最新Windows Server操作系统的模块化特性,从而成为“功能”。 这使得删除GUI非常容易。 首先,启动服务器管理器。

image

Click on Manage, and then select Remove Roles or Features from the menu.

单击管理,然后从菜单中选择删除角色或功能。

image

Click next to skip past the before you begin page, then select your server from the server pool and click next.

单击“下一步”跳过“开始之前”页面,然后从服务器池中选择服务器,然后单击“下一步”。

image

Since the GUI is not a Role, we can just click next again to skip past the Roles section.

由于GUI不是角色,因此我们可以再次单击下一步以跳过角色部分。

image

When you reach the Features page, you need to uncheck the box next to the “User Interfaces and Infrastructure” option, and then click next.

进入“功能”页面时,需要取消选中“用户界面和基础结构”选项旁边的框,然后单击“下一步”。

image

Now tick the “Restart Destination Server” box, then click remove.

现在,勾选“重新启动目标服务器”框,然后单击“删除”。

image

The GUI will now be removed.

GUI现在将被删除。

image

After the binaries are removed your server will automatically reboot.

删除二进制文件后,服​​务器将自动重启。

image

Once it comes back up, and you log in, you will only be able to use the command line.

重新启动并登录后,您将只能使用命令行。

image

打开GUI (Turning the GUI On)

Once the GUI has been turned off, you will want to know how to get it back. To do this we use SConfig, so go ahead and type SConfig into the command line and hit enter.

GUI关闭后,您将想知道如何找回它。 为此,我们使用SConfig,因此,在命令行中键入SConfig并按Enter。

image

You can see near the bottom of the screen that we can use “12” to Restore the GUI, so type 12 and hit enter.

您可以在屏幕底部附近看到我们可以使用“ 12”来还原GUI,因此键入12并按Enter。

image

You will be warned that enabling the GUI requires a reboot, click the yes button.

将警告您,启用GUI需要重新启动,然后单击“是”按钮。

image

That will kick off DISM which will start to add the binaries for the GUI Shell.

这将启动DISM,它将开始为GUI Shell添加二进制文件。

image

When its finished you will be asked if you would like to restart the computer now, type “y” and hit enter to reboot.

完成后,将询问您是否要立即重新启动计算机,请键入“ y”,然后按Enter键重新启动。

使用PowerShell关闭GUI (GUI Off with PowerShell)

You can do the same thing as we did in the GUI much quicker with a PowerShell cmdlet. To do so, open Server Manager, click on Tools and launch PowerShell.

使用PowerShell cmdlet,可以更快地完成与GUI中相同的操作。 为此,请打开服务器管理器,单击“工具”,然后启动PowerShell。

image

We can use the Remove-WindowsFeature cmdlet to remove the feature:

我们可以使用Remove-WindowsFeature cmdlet删除功能:

Remove-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

删除Windows功能Server-Gui-Shell,Server-Gui-Mgmt-Infra

Since Remove-WindowsFeature is just an alias, you could also use:

由于Remove-WindowsFeature只是别名,因此您还可以使用:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

卸载WindowsFeature Server-Gui-Shell,Server-Gui-Mgmt-Infra

image

Not long after you have  hit the enter key, the removal will begin.

按下Enter键后不久,删除操作就会开始。

image

When it’s done, you will be notified that you need to restart your server to complete the process, which can be easily done from the current PowerShell window by running:

完成后,将通知您需要重新启动服务器以完成此过程,可以通过运行以下命令从当前PowerShell窗口轻松完成此操作:

Shutdown –r -t 0

Shutdown –r -t 0

image

When your machine restarts you will only have the command line to work with .

当您的计算机重新启动时,您将只能使用命令行。

image

使用PowerShell打开GUI (GUI On with PowerShell)

The first thing we need to do is get into PowerShell, so type PowerShell and hit enter.

我们需要做的第一件事是进入PowerShell,因此键入PowerShell并按Enter。

image

Now we need to use the Add-WindowsFeature to add the components  back:

现在我们需要使用Add-WindowsFeature将组件添加回去:

Add-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

添加Windows功能Server-Gui-Shell,Server-Gui-Mgmt-Infra

Again this is just an alias for:

同样,这只是以下项的别名:

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

安装Windows功能Server-Gui-Shell,Server-Gui-Mgmt-Infra

image

When its done, we will need to restart our server by using the Shutdown command:

完成后,我们将需要使用Shutdown命令重新启动服务器:

Shutdown –r -t 0

Shutdown –r -t 0

image

When your server reboots you will have the GUI back.

服务器重新启动后,将返回GUI。

翻译自:

转载地址:http://diawd.baihongyu.com/

你可能感兴趣的文章
Centos7安装gitlab
查看>>
android java 与C 通过 JNI双向通信
查看>>
javascript:另一种图片滚动切换效果思路
查看>>
获取css的属性值
查看>>
Win32_NetworkAdapterConfiguration
查看>>
Flash:DisplayObject的transform/matrix的潜规则、小bug
查看>>
方维系统常用的jquery库以及各个库的含义
查看>>
敏捷架构
查看>>
常用神经网络的分类
查看>>
python3.5生成可执行文件exe( PyInstaller)
查看>>
JavaScript 时间与时间戳转换
查看>>
iOS UIScrollView偏移量属性
查看>>
Chi-Square test in R
查看>>
丰德机械介绍我国磨矿介质的发展方向
查看>>
Python 全栈开发十一 深浅拷贝
查看>>
Python爬取图片链接的Ico图片--------实践出真知
查看>>
什么是伪静态?伪静态有何作用?
查看>>
TaintDroid简介
查看>>
[LeetCode]101. Symmetric Tree
查看>>
1-1-08:字符三角形
查看>>