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.
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.
- Right-click the Start button and choose the Run option.
- Type cmd and press enter.
- Run the command: dism /online /enable-feature /featurename:NetFx4ServerFeatures /ALL and press return.
- Type PowerShell and press enter.
- Run the command: Install-WindowsFeature PowerShellRoot,PowerShell,PowerShell-ISE.
- 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.