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
ac1402Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mohammed KhawajaManager - Infrastructure:  Information TechnologyCommented:
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.
Dan McFaddenSystems EngineerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.