powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Stop-WebItem



NAME
Stop-WebItem

SYNOPSIS
Stops an application pool or a site.

SYNTAX
Stop-WebItem [-Passthru] [-Protocol ] [[-PSPath] ] [-WarningAction ] [-WarningV
ariable ] []


DESCRIPTION
The Stop-WebItem can be used to stop a Site or an application pool.


PARAMETERS
-Passthru
Passes an object representing the web item to the pipeline

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Protocol
The protocol to stop (sites only).

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-PSPath
The path to the site or application pool.

Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-WarningAction


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningVariable


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS
PSObject


OUTPUTS
PSObject


NOTES




-------------- EXAMPLE 1: Stopping a Web site --------------

C:\PS>Stop-WebItem 'IIS:\Sites\Default Web Site'


Stops the site named "Default Web Site". No output is returned.





-------------- EXAMPLE 2: Stopping a Web site with feedback --------------

C:\PS>Stop-WebItem 'IIS:\Sites\Default Web Site' -Passthru


Stops the site named "Default Web Site" and reports whether or not the site was stopped.


Name ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 Stopped C:\inetpub\wwwroot\Default Web http *:80:
Site



RELATED LINKS
Start-WebItem
Get-WebItemState
Restart-WebItem