Tuesday, 28 April 2020

Re-install Internet Explorer 11 in Windows Server 2016

So you have been hit by a corruption somewhere in Internet Explorer 11 (IE 11) registry or set up and want to be able to fix it. All the articles and forums and documentation on the Internet seem to say the unfortunate inevitable: “rebuild your system from scratch (format and install) and there is no way to do that in Windows Server 2012 R2 because IE11 is a built-in component.” If you have come up to that blank wall, let me tell you now….

That is completely false information. You can uninstall and reinstall IE 11 in Windows Server 2012 R2 !!!

And this is how!!!

IE 11 ships as a hidden optional feature. The feature is called “Internet-Explorer-Optional-amd64”. Since Windows Server 2012 R2 is a 64-bit only operating system, there is no “x86” equivalent of this feature. To refresh the installation, what we need to do is uninstall this feature, reboot, then install it and reboot again. However, we cannot use Install-WindowsFeature or Remove-WindowsFeature PowerShell commands to do this, because it is a hidden-optional feature. We have to do this using the DISM tool, from a CMD command prompt.
We need to do a total of 2 reboots, so plan for that accordingly before proceeding.

Step 1 – Remove Internet Explorer 11

Open a command prompt in elevated mode and paste in the following command:

C:\> dism /online /disable-feature:"Internet-Explorer-Optional-amd64"
If you get an error like “Error 87”, reboot the system and try again.
The above command will uninstall IE 11 from the system. But you will still see the icons and be able to continue browsing in any active browser windows. A reboot is required to remove it. So REBOOT!!!

NOTE: At the end of the above command, it will automatically prompt you to reboot. Simply hit the “Y” key to reboot the system.

After a reboot, you will see the Internet Explorer icon and shortcuts are completely gone. To be completely safe, clear all the temporary files in the system using this series of commands. It would be safe to ignore any files that cannot be deleted because they were in use:
C:\> DEL /S /Q "%TMP%\*.*"
C:\> DEL /S /Q "%TEMP%\*.*"
C:\> DEL /S /Q "%WINDIR%\Temp\*.*"
C:\> DEL /S /Q "%USERPROFILE%\Local Settings\Temp\*.*"
C:\> DEL /S /Q "%USERPROFILE%\Local Settings\Temp\*.*"
C:\> DEL /S /Q "%LOCALAPPDATA%\Temp\*.*"

Step 2 – Install Internet Explorer 11

Open a command prompt again in elevated mode. This time, we need to enable the feature we disabled above.

C:\> dism /online /enable-feature:"Internet-Explorer-Optional-amd64"
Once again, you will see a little bit of output and then a prompt to reboot. Reboot now. After the reboot, IE 11 will be back, with all the default (out of box) settings. Reconfigure as you please.

No comments:

Post a comment