Stop/Start the Application pool in IIS 6.0 using PowerShell.


Power Shell script to stop the application pool in IIS 6.0:-

 --------------------------------------------------------------------------------

$appPool = get-wmiobject -namespace "root\MicrosoftIISv2" -class "IIsApplicationPool" | where-object {$_.Name -eq "W3SVC/AppPools/SharePoint - 80"}
$appPool.Stop()

---------------------------------------------------------------------------------

 

Power Shell script to start the application pool in IIS 6.0 :-

 --------------------------------------------------------------------------------

$appPool = get-wmiobject -namespace "root\MicrosoftIISv2" -class "IIsApplicationPool" | where-object {$_.Name -eq "W3SVC/AppPools/SharePoint - 80"}
$appPool.Start()

---------------------------------------------------------------------------------

** need to change the name of the application pool (sharepoint - 80) as per in your farm.

 

Comments (3)

  1. Very nice, I just added these to my sharepoint powershell library.

    code.google.com/…/detail

    Thanks!

  2. Raj says:

    Can you please suggest how to start/stop complete iis

Skip to main content