您的位置:首页 > 产品设计 > UI/UE

Switch between Server Core mode and Server GUI mode in Windows Server 2012 R2

2016-02-26 12:25 597 查看
References:

【1】 http://blogs.technet.com/b/john_taylor/archive/2013/01/09/converting-from-server-2012-core-install-to-full-gui.aspx

【2】 https://4sysops.com/archives/switch-windows-server-2012-gui-layers-with-powershell/

【3】 http://bluepig.blog.51cto.com/440658/108636

【4】 https://gallery.technet.microsoft.com/scriptcenter/Switch-between-Windows-9680265d

【5】 http://serverfault.com/questions/427368/command-line-switch-to-administrator-mode

【6】 http://serverfault.com/questions/512231/how-open-a-new-cmd-console-on-a-windows-2012-server-core-after-closing-the-last

Scenarios: install GUI on windows 2012 R2 Server Core using ISO.

Prepare a server core system.

在虚拟机中安装完系统后,在输入密码的时候,如果要输入数字,那个numlock灯要关掉。这个问题可以这样解决,进到bios设置中(Power On to Firmware),然后去到Keyboard Features将numlock设置成on,同时你键盘上的numlock灯要亮着。然后保存退出,系统启动后,再输密码就正常了。

安装vmware tools。在工具栏的VM下,点击install vmware tools。因为我将系统安装在一个盘中,所以光盘应该在D盘中。你也可以通过wmic logicaldisk get size, caption这条命令来看你有几个盘,和盘符的大小,从而判断哪个是CD盘。

    以下每一行为一个命令:

    d:

    dir

    setup.exe

    然后就等vmware tools安装界面跳出,安装好。

  4. 可以对命令行框进行修改。点击左上角,选择Properties,可以对窗口进行大小,字体,颜色的调整。

  5. 做一个snapshot。

  6.将系统光盘放入虚拟机中,需要mount该光盘到系统中,不然dism命令读不到D盘的数据。【1】

    以下以点开头的行为一个命令:

mkdir c:\mount

dism /get-imageinfo /imagefile:d:\sources\install.wim

(这句命令的意思是查看你的iso镜像的index跟系统类型的关系。)

dism /mount-wim /wimfile:d:\sources\install.wim /index:2 /mountdir:c:\mount /readonly



这里如果卡在95%很久,那就敲一下回车。

powershell

(enter PowerShell prompt)

Install-windowsfeature server-gui-mgmt-infra,server-gui-shell –restart –source c:\mount\windows\winsxs

(pay attention to the blank space before –start, -source and c:\...)



68%这里会卡很久,请耐心等待,应该在1小时以内。

Scenarios: uninstall GUI in Windows 2012 R2

打开cmd窗口,以下一行为一个命令 【1】

    Powershell

    Uninstall-windowsfeature server-gui-mgmt-infra,server-gui-shell

    Restart-computer

此外:1. 如何在命令行中共享其他机器上的文件。【3】

      使用net use, 以下一行为一个命令。

      net use x:\ \\mypc_name\share

      x:

   2. 【4】的想法不错,但是我没有实现,总是出现安全问题不能运行那个文件,改天需要用到这样的知识再去研究吧。

   3. 【5】在命令行中用administrator的身份打开powershell, Start-Process powershell -Verb runas

   4. 【6】If you close all command prompt windows and want to open a new Command Prompt window, press CTRL+ALT+DELETE, click Start Task Manager, click More Details,         click File, click Run, and then type cmd.exe. Alternatively, you can log off and log back on.

      
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: