Server 2012 Converting from GUI to Shell

http://forums.mydigitallife.info/threads/40304-How-To-Convert-Server-2012-Core-Installation-into-Full-GUI-Server-and-viceversa

We have to use Powershell for this purpose .To start Powershell from Command Prompt,just type Powershell.To know the Powershell Execution Policy with the following code:

Code:
Get-ExecutionPolicy

And then to start with unrestricted privileges we must use the following code on the server

Code:
Set-ExecutionPolicy –ExecutionPolicy Unrestricted

And if you are accessing server from some other computer then use the following code..

Code:
Set-ExecutionPolicy –Force RemoteSigned

Steps to Convert from a Server Core installation to a Server with a GUI installation :

We should first determine the index number for a Server with a GUI image (for example, SERVERDATACENTER, not SERVERDATACENTERCORE) with the following code in Powershell…

Code:
Get-WindowsImage -ImagePath <path to wim>\install.wim

Note:

The path to install.wim can be your Server 2012 DVD or your Server2012.iso image which can be mounted with various image mounting tools like UltraISO,Imdisk,etc..Or you can just copy the istall.wim to your hard disk and point your source…

For example: 

Code:
Get-WindowsImage -ImagePath D:\sources\install.wim

Now note down the Index number of the Install Option that you would like to use for conversion…

Convert to FULL GUI Installation :

Now Run the following code to convert Server Core Installation into Full Server installation :

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell –Restart –Source wim:<path>:<index>

NOTE:

“<path>” is the path to your install.wim
“<index>” is the Index number that you got from Step no. 1

So if you are using your Server Standard 2012 DVD that is on D: drive then you run the following code in powershell with administrative privilege..

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart –Source wim:D:\sources\install.wim:2

Similarly for Converting DataCentre Core into Full installation you can use the following code in powershell..

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart –Source wim:D:\sources\install.wim:4

Alternately you can also use Windows Update if you don’t have Server 2012 DVD or install.wim file…In that case just use the following code.

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart

Convert to Minimal Server Interface :

Just like the above, you can convert your Core Installation into Minimal GUI Interface Mode….

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra -Restart –Source wim:<path>:<index>

NOTE:

“<path>” is the path to your install.wim
“<index>” is the Index number that you got from Step no. 1

So if you are using your Server Standard 2012 DVD that is on D: drive then you run the following code in powershell with administrative privilege..

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart –Source wim:D:\sources\install.wim:2

Similarly for Converting DataCentre Core into Full installation you can use the following code in powershell..

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra,Server-GUI-Shell -Restart –Source wim:D:\sources\install.wim:4

Alternately you can also use Windows Update if you don’t have Server 2012 DVD or install.wim file…In that case just use the following code.

Code:
Install-WindowsFeature Server-GUI-Mgmt-Infra –Restart

Steps to Convert from a Server GUI Full Installation to a Server Core Installation :

Powershell should run with administrator privileges.Otherwise the script will not run…

Server GUI Full Installation To Server Minimal Interface :

Use the following code in Powershell to Convert your full Standard Installation into Server Minimal Interface installation…

Code:
Uninstall-WindowsFeature Server-Gui-Shell –Restart

If you initially install with the Server with a GUI option and then use the above command to convert to a Server Core installation, you can later revert to a Server with a GUI installation without specifying a source. This is because the necessary files remain stored on the disk, even though they are no longer installed.

But if you want to recover disk space and you want to reduce the size of the server installation then you can use the folloing code in powershell..

Code:
Uninstall-WindowsFeature Server-Gui-Shell –Remove –Restart

Server GUI Full Installation To Server CORE :

Use the following code in powershell to convert your Full Server with GUI Installation into Server Core installation…

Code:
Uninstall-WindowsFeature Server-GUI-Mgmt-Infra,Server-Gui-Shell –Restart

And if you want to remove all the associated files of the uninstalled features then just use the following code…

Code:
Uninstall-WindowsFeature Server-GUI-Mgmt-Infra,Server-Gui-Shell –Remove –Restart

Server Conversion Script:

To make things easier for you guys i have compiled a nice little script which will help in automating all the Server Conversion options..It would be nice if you guys could use it and give me some feedback…

NOTE: Its important to run “Conversion.cmd” with Administrative Privilege Otherwise conversion script will not work…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s