I was trying to test our products to make sure that they are compatible with Windows Server 2016. And during some testing, I mistakenly thought that I can simply "downgrade" .NET framework from 4.6 to 4. So I removed .NET 4.6 from Roles and from IIS.

Now, I can't install it back using installer (because its part of OS so it is asking me to enable it from role & features). And I can't start server manager (to install role & features) because it needs .Net 4 at minimum.

1.Server Manager Error 2. .NET4 Setup Error

So I am stuck. Do I have any other option than reinstalling OS ? I have sent so much time testing this system, I would rather not do it if possible.

UPDATE: I already tried .NET installer for older Windows OS but it didn't help.

  • Try this offline installer (.NET 4.6): microsoft.com/en-US/download/details.aspx?id=48137 – duDE Feb 28 '17 at 16:10
  • Tried it already. Unfortunately it ends with message that this is not for your OS. Apparently it's not for 2016. – JackLock Feb 28 '17 at 16:13
  • Maybe can this helps: technig.com/how-to-install-windows-features-offline-using-dism – duDE Feb 28 '17 at 16:17
  • 1
    @dude , downloading iso from MSDN and then going to try. Though not have very high hopes because DISM document doesn't mention support for Server 2016. I will post my finding here. – JackLock Feb 28 '17 at 16:26
  • 1
    @dude, It worked !! I "enabled" 4.6 and everything is back on track. I can't believe that. This has literally saved me 2 days of re-setup time. I really appreciate your help. If you put your suggestion in answers and I will accept it as answer (and add comment about command that helped) so future visitors can be benefited. – JackLock Feb 28 '17 at 16:59

Try to to install .NET Offline using DISM like in this example for .NET 3.5:

Type the following command: “Dism /online /enable-feature /featurename:Netfx3 /source:D:\Sources\sxs” and then press enter. It take a while and when the process has finished, close the PowerShell Windows then go to check the exact windows features must be installed successfully.

Thank you @JackLock for this comment:

So based on your suggestion, I enabled feature called "NetFx4". Since it was already installed, I didn't need to provide source of it. So my command looked like

Dism /online /Enable-Feature /FeatureName:NetFx4 /All

| improve this answer | |
  • 2
    So based on your suggestion, I enabled feature called "NetFx4". Since it was already installed, I didn't need to provide source of it. So my command looked like Dism /online /Enable-Feature /FeatureName:NetFx4 /All – JackLock Feb 28 '17 at 17:16

Thank you duDE and JackLock. Both of your answers helped me to fix this problem.

My problem: On Windows Server 2016, the .NET Framework 4.6 had been inadvertently uninstalled from my system while trying to fix some issues with IIS. It was removed using the Server Manager > Remove Roles and Features.

As a result, the Power Shell, Server Manager, and Event Viewer were no longer working. So I downloaded and installed the latest offline version of the .NET Framework 4.7 from Microsoft using the installer. However, it did not fix the problem when installed by clicking on the installer.

Solution To fix the problem, I had to install it from the command line using the "/all" switch. I unzipped the installer to a folder and here is the command that I used to install it. In the last argument in quotes is the path to the installer, which will need to be modified based on where you have the installer unzipped:

Dism /online /enable-feature /all /featurename:Netfx4 /source:"E:\t\NDP47-KB3186497-x86-x64-AllOS-ENU (Microsoft .NET Framework 4.7)"
| improve this answer | |
  • It’s not possible for .NET Framework 4.6 to be uninstalled from Windows Server 2016 (it’s built-in). The command you issued installed .NET Framework 4.7 which replaced .NET Framework 4.6 – Ramhound Oct 21 '19 at 18:01
  • 1
    .NET Framework 4.6 can be uninstalled from Windows Server 2016, but it does cause a number of built-in applications to also not work (such as ServerManager). – Slogmeister Extraordinaire Oct 22 '19 at 17:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.