Problems Removing IIS role

Anonymous
2024-04-25T12:10:55+00:00

Hello to everyone!!

I have a Windows Server 2016 machine hosted on Azure.

I'm trying to remove IIS role from this server. I get a message that the uninstall process has completed successfully, but when I reboot the machine I get a message saying ‘We couldn't complete features. Undoing changes’. I have run the ‘sfc’ and ‘DISM’ commands and it shows that there are no errors in the system.

Thank you in advance.

Windows for business Windows Server Devices and deployment Install Windows updates, features, or roles

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question. To protect privacy, user profiles for migrated questions are anonymized.

0 comments No comments
{count} votes
Accepted answer
  1. Anonymous
    2024-04-25T14:28:27+00:00

    Hi Soporte_OP,

    in your case, here are some steps you can try:

    1. Check the Windows Update history to see if any updates related to IIS were installed recently. If so, try uninstalling those updates and then attempt to remove the IIS role again.
    2. Try removing the IIS role using PowerShell instead of the Server Manager GUI. Open PowerShell as an administrator and run the following command: Uninstall-WindowsFeature -Name Web-Server -Restart

    This will uninstall the IIS role and automatically restart the server.

    1. If the above steps don't work, you can try manually removing the IIS role by deleting the following folders:

    C:\Windows\System32\inetsrv

    C:\inetpub

    However, please note that this is not a recommended method and may cause issues with other applications that rely on IIS.

    Hope it helps.

    Best regards,

    Lei

    2 people found this answer helpful.
    0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2024-05-05T23:06:48+00:00

    Hi did you ever resolve this?

    I am running into the same issue but on Server 2019.

    Uninstalled using Server Manager and uninstalled using Powershell both failed to remove the role.

    I also ran through the dsim and sfc suggestions from other forums.

    I was trying to remove the RD terminal services, which I was successful in doing, but IIS didn't get removed along with it. Now manually trying to remove IIS will not work. Same error as you.

    0 comments No comments
  2. Anonymous
    2024-05-07T08:49:31+00:00

    Hi Lei,

    Thank you for your answer. Trying to uninstall IIS through PowerShell, I've received this error message:

    "The request to add or remove features on the specific server failed. Removal of one or more roles, role services or features failed. Error: 0x800f0922".

    I can't remove manually the folders because "there are files opened by other applications".

    0 comments No comments
  3. Anonymous
    2024-05-07T08:59:34+00:00

    I'll Look into this for you

    0 comments No comments
  4. Anonymous
    2024-05-07T12:39:15+00:00

    Hi Soporte_OP,

    to resolve the error 0x800f0922, please refer to Error 0x800f0922 when you uninstall roles - Windows Server | Microsoft Learn.

    0 comments No comments