How to remove IIS from Windows Server using PowerShell

Photo of author
Written By Jan Reilink

Windows Server systems administrator & enthusiast.

No more need for Windows Server IIS? Want to remove IIS completely from Windows Server using PowerShell? Start your PowerShell console as admin, and issue the following command in PowerShell:

Uninstall-WindowsFeature -Remove Web-Server

This will completely remove Internet Information Services (IIS) and its configuration! If you want to remove IIS web server, and be able to reinstall it later on, don’t use the -Remove parameter:

Uninstall-WindowsFeature Web-Server

Uninstalls specified Windows Server roles, role services, and features from a computer that is running Windows Server 2012 R2. By adding the Remove parameter, also deletes feature files, or payload, from a computer. This cmdlet replaces Remove-WindowsFeature, the cmdlet that was used to uninstall roles, role services, and features in Windows Server 2008 R2.


Before removing IIS from your server, don’t forget to backup IIS and its configuration.

Did you like: How to remove IIS from Windows Server using PowerShell

Then please, take a second to support Sysadmins of the North and donate!

Your generosity helps pay for the ongoing costs associated with running this website like coffee, hosting services, library mirrors, domain renewals, time for article research, and coffee, just to name a few.

6 thoughts on “How to remove IIS from Windows Server using PowerShell”

  1. This removes the install files also so be careful if you’re just trying to remove the tools but want to be able to install again without having to point at alternative media


Hi! Join the discussion, leave a reply!

%d bloggers like this: