Warning: Do Not remove .NET 4.5 in Windows 2012.
We had a programmer that was working in setting up a website with asp.net. Settings were not working the way they suspected. They decided to remove .NET 4.5 from the Windows 2012 R2 Server.
When you remove .NET 4.5 what else will be removed?
This is from John Marlin on the Windows Server Core Team.
It is not recommended to uninstall .NET Framework. In some given circumstances, there may be a requirement to remove/re-install .Net Framework on Windows Server 2012/2012 R2.
If you read through the list, the components that are affected by this removal are listed as follows:
- .NET Framework 4.5 Features
- RSAT (Remote Administration Assessment Toolkit) which includes Hyper-V Management tools and Hyper-V GUI,
- User interfaces and Infrastructure, which includes Graphical Management Tools and Infrastructure Server Graphical Shell (Full Shell and min Shell),
- PowerShell which will remove complete PowerShell 4.0 and ISE
Here is a Powershell command view of what will be removed:
So the server has been rebooted and there is no .NET 4.5 or Powershell and the server is in core mode.
How to get he server back to the full GUI?????
Well I had to figure it out.
If you get into this situation, run the below commands in the Server Core’s command prompt window to help you recover:
DISM.exe /online /enable-feature /all featurename:NetFx4
DISM.exe /online /enable-feature /all featurename:MicrosoftWindowsPowerShell
After those commands have finished without errors.
Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra
Once the GUI Shell is installed, you will need to restart the server with the following command:
After the reboot I informed the programmer to ask before removing anything for the server.