Address
304 North Cardinal St.
Dorchester Center, MA 02124
Work Hours
Monday to Friday: 7AM - 7PM
Weekend: 10AM - 5PM
Follow this if you have no more need for Windows Server IIS and want to remove IIS completely from Windows Server using PowerShell
No more need for Windows Server IIS? Want to remove IIS completely from Windows Server using PowerShell? Learn how to remove IIS from Windows Server using PowerShell.
Follow this if you have no more need for Windows Server IIS and want to remove IIS completely from Windows Server using PowerShell.
To remove IIS 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.
If the Uninstall-WindowsFeature
fails you can always resort to DISM’s Disable-WindowsOptionalFeature. To remove or disable IIS-Webserver and its parent role IIS-WebServerRole execute the following command:
Disable-WindowsOptionalFeature -Online -NoRestart -FeatureName IIS-WebServerRole, IIS-WebServer
Before removing IIS from your server, don’t forget to backup IIS and its configuration.
-Remove
switch ensures you uninstall every related payload cleanly, while being fully aware of services that rely on itIn short, uninstalling IIS using PowerShell is a strategic choice when you don’t need the full web server stack. It:
Use the built‑in PowerShell commands to uninstall efficiently and cleanly. Afterward, your server is leaner, safer, and easier to maintain – perfect for environments where IIS isn’t a necessity.