Since 2016 · 50,000+ customers · ★ 5.0 on Google Live chatWhatsAppTelegramOpen a ticket
Get started
Windows Server

How to Uninstall IIS on Windows Server and Windows 11

How to uninstall IIS on Windows Server guide by 99RDP

Internet Information Services (IIS) is Windows' built-in web server. You may want to remove it to free port 80 or 443 for another web server, reduce the attack surface, or clean up a server that no longer hosts sites. This guide shows how to uninstall IIS on Windows Server 2016, 2019, 2022 and 2025 (Server Manager, PowerShell, DISM) and on Windows 10 and 11, plus how to just disable it instead.

Quick answer

# Windows Server (PowerShell as Administrator)
Uninstall-WindowsFeature -Name Web-Server -IncludeManagementTools -Restart

# Windows 10 / 11 (PowerShell as Administrator)
Get-WindowsOptionalFeature -Online | Where-Object { $_.FeatureName -like 'IIS-*' -and $_.State -eq 'Enabled' } |
  Disable-WindowsOptionalFeature -Online -NoRestart
Restart-Computer
Steps to uninstall IIS on Windows Server: back up sites, remove the Web Server role, restart, check
Remove IIS

Before you uninstall IIS

  • Check what depends on it. WSUS, Exchange, SharePoint, RD Web Access, Certificate Services web enrollment and many line-of-business apps need IIS. Removing it breaks them.
  • Back up your sites and settings if you might need them again:
    %windir%\system32\inetsrv\appcmd.exe add backup "before-uninstall"
    robocopy C:\inetpub D:\Backup\inetpub /E
  • Plan a restart. Removing the Web Server role usually requires one.

Method 1: Uninstall IIS with Server Manager

  1. Open Server Manager → Manage → Remove Roles and Features.
  2. Select your server and click Next.
  3. Untick Web Server (IIS). A dialog lists the features that will be removed with it, such as the IIS Management Console. Click Remove Features.
  4. Click Next through to the confirmation page, tick Restart the destination server automatically if required, and click Remove.

Method 2: Uninstall IIS with PowerShell

Get-WindowsFeature Web-* | Where-Object Installed     # see what is installed
Uninstall-WindowsFeature -Name Web-Server -IncludeManagementTools -Restart

Removing Web-Server also removes all IIS role services under it. Add -Remove if you also want to delete the feature files from the disk; you'll then need installation media to add IIS again.

Ways to remove IIS: Server Manager, PowerShell on Windows Server, optionalfeatures on Windows 11
Ways to remove IIS

Method 3: Uninstall IIS with DISM (Command Prompt)

DISM works on both Windows Server and Windows 10/11, including Server Core:

dism /online /get-features /format:table | findstr /i "IIS-"
dism /online /disable-feature /featurename:IIS-WebServerRole

If DISM reports that other features depend on it, disable the listed IIS-* features first, or use the PowerShell loop in the quick answer, which disables all of them.

Uninstall IIS on Windows 10 and Windows 11

  1. Press Win+R, type optionalfeatures and press Enter.
  2. Untick Internet Information Services (the box empties for all its sub-features). Also untick Internet Information Services Hostable Web Core if it is ticked.
  3. Click OK and restart when asked.

Confirm IIS is removed

Get-WindowsFeature Web-Server               # Install State: Available (Windows Server)
Get-Service W3SVC, WAS -ErrorAction SilentlyContinue
netstat -ano | findstr ":80 "

No W3SVC service and nothing listening on port 80 mean IIS is gone. The C:\inetpub folder and its logs are left behind on purpose; delete it once you're sure you don't need the content.

Checklist after removing IIS: inetpub folder left behind, ports 80 and 443 free, dependent apps
After removing IIS

Disable IIS instead of removing it

To stop IIS without uninstalling it, for example to test another web server first:

iisreset /stop
Set-Service W3SVC -StartupType Disabled
Set-Service WAS -StartupType Disabled

Re-enable it later with Set-Service W3SVC -StartupType Automatic and iisreset /start.

Frequently asked questions

How do I remove IIS from Windows Server 2022?

Run Uninstall-WindowsFeature -Name Web-Server -IncludeManagementTools -Restart in PowerShell as Administrator, or untick Web Server (IIS) in Server Manager's Remove Roles and Features wizard.

How do I uninstall IIS on Windows 11?

Open optionalfeatures, untick Internet Information Services, click OK and restart.

Does uninstalling IIS delete my websites?

No. Site files in C:\inetpub\wwwroot (or wherever you stored them) stay on the disk. The IIS configuration is removed, so back it up with appcmd add backup first.

Will removing IIS free port 80?

Yes, unless another service also uses it. Check with netstat -ano | findstr ":80 "; the last column is the process ID of whatever still listens on the port.

Minakshi, Server Administrator L1 at 99RDP
Written byMinakshiServer Administrator L1, 99RDP. Part of the team that runs our servers and answers support.
Keep reading

More Windows Server guides

All Windows Server guides

Need a server for this?

✓ Setup in minutes✓ Full admin access✓ 7-day refund on new services