We help IT Professionals succeed at work.

I am unable to uninstall roles and feature on Windows Server 2012 R2 due to pending restart

Due to an error on IIS when using remoteApp I am trying to uninstall IIS on my Windows Server 2012 R2, but the job fails because of pending restart. I have restartet the server many times, but the problem still exist. I hope some of you can help me figure out what is causing the server to want restarting all the time and not give me the option to remove a role/feature.

I have accidentially deleted the RDWEB folder on the IIS and therefore I need to uninstall the service and install it again
Comment
Watch Question

Mohammed KhawajaManager - Infrastructure:  Information Technology

Commented:
Go to services, change Remote Desktop services to manual for startup and try again.  You may need to reboot the server prior to trying to remove role.
Systems Engineer
Commented:
Since rebooting the server has not cleared the pending reboot flag, I would try this.


1. Make a Backup of your registry before attempting this action!
2. Make a Backup of your registry before attempting this action!
3. Make a Backup of your registry before attempting this action!

3a.  link to backing up registry  http://support.microsoft.com/kb/322756/
4. Look at the following registry location:  HKLM\System\CurrentControlSet\Control\Session Manager\
5. Look for a key named:  PendingFileRenameOperations
6. If the key in #2 exists, delete it.

Try to uninstall the feature/roles you need to.

PS:  I cannot stress enough, that you need to create a backup of your registry before playing in there.

Dan