PowerShell: Uninstall/Disable/Switch From Windows Server Desktop GUI To Server Core Mode


Purpose: Uninstall/disable Windows Server 2012 R2 full desktop experience to switch to Server Core mode

Run the following Uninstall-WindowsFeature command in an elevated privilege PowerShell window using an account with local administrator privileges:

Uninstall-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra –Restart [-Remove]

-Remove : This switch can be used to delete the binary files from the WinSXS folder. This will prevent full GUI reactivation without the Windows source files.

This feature was removed from Windows Server 2016 onward. Refer to this article for more information: Switching between Windows Server 2016 Server Core and Desktop Experience – Microsoft Windows Server Blog

Uninstall-WindowsFeature (ServerManager) | Microsoft Docs

PowerShell: Install/Enable/Switch From Windows Server Core Mode To Server Desktop GUI – CodeCentral.com

Leave a comment