Stop IIS Website With PowerShell

Administrators can use PowerShell to stop IIS websites on Windows Server machines. This is much faster than using IIS Manager, which takes longer for the website to completely close down.

In order to stop IIS websites, administrators will need the IIS PowerShell modules. This module is installed by default on Windows Server 2016 and up. If you are using an older version of Windows Server, install this feature from Add/Remove Features under server manager.

Stop Website

To stop a website that runs on IIS Server, Open a PowerShell console and run the following cmdlet to list all sites that are running or stopped on the server. Note the name of the site you would like to stop.

get-iiswebsite

Using the site name, run this command to stop the website without a confirmation prompt.

Stop-IISSite -Name SITENAME -Confirm:$false

About PowerShell

PowerShell is a command-line shell and scripting language. It was built on the .NET Framework and is designed especially for system administrators. PowerShell is widely used by developers, IT professionals, power users, and help desk technicians to automate tasks that are repetitive in nature. Also, it has a number of third-party tools available which make working with cmdlets easier.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.