Do not remove .NET 4.5 in Windows 2012

By | May 30, 2014

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.

Mental question…

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:

  1. .NET Framework 4.5 Features
  2. RSAT (Remote Administration Assessment Toolkit) which includes Hyper-V Management tools and Hyper-V GUI,
  3. User interfaces and Infrastructure, which includes Graphical Management Tools and Infrastructure Server Graphical Shell (Full Shell and min Shell),
  4. PowerShell which will remove complete PowerShell 4.0 and ISE

Here is a Powershell command view of what will be removed:

PowershellNet45

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:

Restart-Computer

After the reboot I informed the programmer to ask before removing anything for the server.

3 thoughts on “Do not remove .NET 4.5 in Windows 2012

  1. LB

    Thanks for the info. You need a / before FeatureName though, fyi. commands: DISM.exe /online /enable-feature /all /FeatureName:NetFx4

  2. anirudha mhatre

    “Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra ” cmd to be run from powershell

  3. Darren Dingo

    Must be run in powershell ‘powershell.exe’

Comments are closed.