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.