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!
- CTRL+ALT+ESC / Open Task Manager
- New Task “powershell.exe” or “cmd.exe”
- DISM.exe /online /enable-feature /all /featurename:NetFx4
- DISM.exe /online /enable-feature /all /featurename:MicrosoftWindowsPowerShell
- Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
** 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“.