Unable to add Roles and Features to Server 2012

posted in: Troubleshooting | 0

You’re trying to install a new Role of Feature onto your 2012 server, and your met with this ugly screen..
This isn’t a good sight, and is normally indicative of a patch, or update in a pending reboot state. However, this could also be indicative of system file corruption..
So first and foremost, it should be stated that this is a difficult issue to troubleshoot, and to resolve. Here’s the reasons. Let say we rename pending, or move it, this could potentially lead to an issue sometime down the road. Lets also assume we do a repair, we still do not have an 100% that another problem won’t manifest. So the important thing to note, is that troubleshooting, is not a guarantee of recovery, and repair, is no guarantee it won’t happen again.
With that being said, lets try to reboot the system. If that doesn’t work, then you have a few other options to try..

I will list a few that have worked for me. This however, doesn’t guarantee that your issue will be resolved, so MAKE SURE YOU HAVE GOOD BACKUPS, because this is likely caused by a corrupted patch installation or un-installation, and may in fact lead to the need to re-install the OS if we don’t apply careful corrective measures.

Additionally – I won’t state that this article is all inclusive, so if you have any additional suggestions, please drop a comment, and I’d love to add it to my article.

The first thing to try is a verification that the TrustedInstaller service is running and set to Automatic. (Windows Modules Installer) – If it is infact running, and not disabled, and the system has been rebooted at least 2 times, a dism command to try and clean the install.

dism /online /cleanup-image /restorehealth


If this doesn’t yield anything productive, and additinal dism command, this time, while booted from recovery media, may yield positive results.

dism.exe /image:C:\ /cleanup-image /revertpendingactions 

perhaps, you run this command, and receive an error – Error 0x800ffff
After running the command, the CBS log (C:\Windows\logs\CBS\cbs.log) may indicate the following:

This may be indicative of a patch/hotfix/update, in a stuck or corrupted state.

Further reviewing the c:\windows\winsxs\pending.xml, may indicate patches in a condition of which the OS believes still need to be installed or uninstalled.


If this is the case, and you have rebooted, at least 2 times. (If you haven’t, STOP right there, and go reboot again) –
However if you have, its possible that one of these items is corrupted.

Search for the patch or installation, and attempt to manually install/uninstall.

If that doesn’t work, you may have to try doing some registry hacking. I’m not including it here, however, I have included a link below.
ANOTHER IMPORTANT NOTE – Proceed very carefully when making ANY registry changes. Make sure you understand what you are doing, before you attempt to modify the registry.. IF YOU DO NOT understand these changes, and which apply to you, SKIP THIS STEP, and move on to the next step. I have seen far to many individuals kill their system, by willy-nilly registry hacking.. CONSIDER YOURSELVES WARNED..


Next, you may try to move the C:\Windows\WinSxS\pending.xml to an alternate location. (You can’t simply rename this file in the windows directory) – You can however, move it to a location outside of this path.

Try rebooting the computer after you move the file, and with any hope, you should now have access to add roles and features again, and have the ability to update.

Obviously, this is a bit of a work around, but this may get the system into a condition that more repair options become available. (Windows Updates, stand alone patches, etc.)

If at this point, you are still having NO luck, and none of these avenues are addressing your issue, it’s most likely time to reload the OS, or if you have support, engage your escalation avenues.

Sources :

Registry Hacking: http://www.expta.com/2010/06/exchange-setup-repeatedly-says-restart.html
Removing Corrupted Hotfixes: http://support.microsoft.com/kb/971187

Comments are closed.