Can’t Install Roles or Features on Windows 2012 R2

I came across a really strange issue.  When going through the Add Roles and Features Wizard, I tried to click next to the Server Roles page.  The wizard then shows a red bar with the following error, “The request to list features available on the specified server failed.”

Doing an SFC /SCANNOW like so many internet searches says to do, does not clear the issue.  The reason seems that the server was in a pending reboot state for changes to be made.  Rebooting never makes any changes.  This state also prevents using DISM from fixing any corruption.

It turns out that one can boot into the repair console to get to files offline.  Navigate to the C:\Windows\WinSxS directory and rename the pending.xml file to something like pending.xml.old.  This tricks Windows into thinking that nothing else is pending a reboot and allows one to use SFC and DISM to clean up system files.

It looks like a ton of Windows updates went in, but didn’t get installed correctly.  Checking for Windows updates produced over 77 important updates as opposed to the 3 that were being presented before renaming pending.xml.

SFC and DISM fixes went in, a couple of reboots and I am now able to properly install roles and features.