Home » PowerShell » PowerShell Stop IIS App Pool

PowerShell Stop IIS App Pool

In Web Server Management, stopping the IIS (Internet Information Services) application pool is a common administrative task. PowerShell has a WebAdministration module that provides cmdlets for managing IIS, including the stopping of IIS pools.

To stop an IIS app pool, you can use the `Stop-WebAppPool` cmdlet. The Stop-WebAppPool command stops the specified IIS pool.

The following script will stop the IIS pool named “HMI”.

Stop-WebAppPool -Name "HMI"  

In the above PowerShell script, the Stop-WebAppPool cmdlet uses the Name parameter to specify the application pool name, in this case, “HMI“. This command first gets the Application pool and lastly, stops the IIS pool.

The Name parameter specifies the name of the application pool to be stopped.

The output of the above PowerShell script stops the IIS pool. After executing the PowerShell command, you can confirm the application pool status using the Get-WebAppPoolState command.

Kindly Note, that the Stop-WebAppPool cmdlet will throw an exception if the IIS app pool doesn’t exist in the IIS.

Conclusion

I hope the above article on how to stop the IIS app pool using the PowerShell Stop-WebAppPool cmdlet is helpful to you.

The IIS Application pool is a group of websites or web applications that are managed together by the IIS. Hence stopping the IIS application pool is significant for resource management, server maintenance, and security.

You can find more topics about PowerShell Active Directory commands and PowerShell basics on the ShellGeek home page.

Related Articles

Check IIS Status

Start IIS App pool

Get a list of application pools

Get All IIS Site Bindings