Why you shouldn’t remove .NET in Windows Server

Good afternoon.
The rumors of my demise have been greatly exaggerated. It is time for another interesting issue. I have seen this issue a few times now, but this last time I was finally able to put my finger on the cause and correct it. The issue in this case occurs when the .NET Framework 4.7 Features are removed from Server Manager. See the picture below.

There is a whole slew of issues that will come up by removing .NET. One of which is that Server Manager and PowerShell no longer function. See below for a couple of errors that can be encountered.

The code execution cannot proceed because mscoree.dll was not found.  Reinstalling the program may fix this problem.
The code execution cannot proceed because mscoree.dll was not found.
MMC could not create the snap-in.  CLSID: FX:{b05566ad-fe9c-4363-be05-7a4cbb7cb510}
MMC could not create the snap-in. CLSID: FX:{b05566ad-fe9c-4363-be05-7a4cbb7cb510}

So this should be easy to fix. Just fire up Server Manager… Well that would be great if it worked. No problem, I know a fancy PowerShell command. Shoot, that doesn’t work either. Don’t fret though. There is a tool that has been with Windows since 2008 and still works to add or remove a feature. The tool is dism. Here are the steps to get .NET and PowerShell put back.

  1. Right-click the Start button and choose the Run option.
  2. Type cmd and press enter.
  3. Run the command: dism /online /enable-feature /featurename:NetFx4ServerFeatures /ALL and press return.
  4. Type PowerShell and press enter.
  5. Run the command: Install-WindowsFeature PowerShellRoot,PowerShell,PowerShell-ISE.
  6. Restart the server.

After running through the above the server should function normally again. I tested this process in Windows Server 2019, but should also work in Windows Server 2016 also.

I hope you found this article informative. If you have anything to add please feel free to leave a comment below.

17 thoughts on “Why you shouldn’t remove .NET in Windows Server

  1. I wish there will be more people like you on the internet.
    Direct to the problem, not giving stupid explanations just to get more time of attention. Exact, Precise, thank you so much.

    Like

Leave a comment