Graphic Shell Missing After Removing .NET Framework 4.5 on Windows Server 2012/2012 R2

Windows is fun. Just came upon a curious accident on our discord chat. For troubleshooting purposes a re-installation/repair of the current .NET Framework 4.5 was necessary.

Removing .NET Framework 4.5/4.5.1 will also remove the following features as well:

  • [User Interfaces and Infrastructure] Server Graphical Shell
  • [User Interfaces and Infrastructure] User Interfaces and Infrastructure

Guess what happend! You too? You just removed it, didn’t you? You removed .NET Framework 4.5/4.5.1 from your Windows Server 2012/2012 R2 installation and did not notice the correlating features? You’re left without GUI and have no clue where to start, your friendly KB entry on technet has gone missing? Easy!

  1. CTRL+ALT+ESC / Open Task Manager
  2. New Task “powershell.exe” or “cmd.exe”
  3. DISM.exe /online /enable-feature /all /featurename:NetFx4
  4. DISM.exe /online /enable-feature /all /featurename:MicrosoftWindowsPowerShell
  5. Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
  6. Restart-Computer

** If your current user shell doesn’t accept or recognize any commands and responds with the following error message “not recognized as an internal or external command“, start ‘cmd’ utility as other user (Local Admin). Removing the .NET Framework can mess with the current environment variable “System Variables”.

Double check your syntax, try cmd as other user and reboot your machine before proceeding with this helpful entry “HowTo: Set an Environment Variable in Windows – Command Line and Registry“.