no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | windows:server_os:core_to_gui [2019/10/31 09:06] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Uninstall GUI from Windows Server 2012 R2 ====== | ||
+ | Some programs require the desktop environment to be present. Otherwise the installation procedure doesn’t work. I came across such a program and was forced to install it on a server with GUI installed. Later I realized that the program itself doesn’t require the GUI (at any time), so i decided to remove the GUI. Here’s how:I’ll show how to do it via PowerShell only. The only way to learn PowerShell it is to use it. | ||
+ | Cmdlet used to achive this is ‘Uninstall-WindowsFeature’ (or it’s alias ‘Remove-WindowsFeature’). In my case, I want to remove both GUI Shell and GUI Management Tools and Infrastructure. Run PowerShell in elevated mode and list the features in order to get the percise feature name: | ||
+ | <code bash> | ||
+ | PS C: | ||
+ | |||
+ | Display Name Name | ||
+ | ------------ | ||
+ | [X] Graphical Management Tools and Infrastructure | ||
+ | [X] Server Graphical Shell Server-Gui-Shell | ||
+ | |||
+ | |||
+ | PS C: | ||
+ | </ | ||
+ | Because I know that the uninstall requires a restart, ill use the ‘-restart’ parameter, and I’ll simply pipe the results of ‘Get-WindowsFeature’ to ‘Uninstall-WindowsFeature’ | ||
+ | <code bash> | ||
+ | If you plan on installing it again at the later time, you’re done. Else you can use the ‘-Remove’ parameter . | ||
+ | <code bash> | ||
+ | This will delete the feature from the side-by-side store (“$env: | ||
+ | |||
+ | | ^ Server Core ^ Minimal Server Interface ^ Server with a GUI ^ Server with a GUI with Desktop Expirience ^ | ||
+ | ^ Avaliable tools | Command Prompt, Windows powerShell, .NET Framework | MMC, Server Manager, several Control Panel applications | Windows Explorer, Internet Explorer, Task Bar, Control Panel | Windows Media Player, Themes, Windows 8 shell, Windows Store | | ||
+ | ^ PowerShell Features | None | Server-Gui-Mgmt-Infra | Server-Gui-Mgmt-Infra, | ||
+ | ^ Server Manager Features | None | Graphical Management Tools and Infrastructure | Graphical Management Tools and Infrastructure, | ||
+ | |||
+ | It is not recommended to install the desktop experience on a production server unless there is a real-life, honest compelling business reason for doing so. |