Come and Check our BETA Alpha version of Powershellcenter.net
Send me your comment to Powershell@powershellcenter.com

Synopsis

Stops an application pool or a site.

Syntax

Stop-WebItem [-Passthru] [-Protocol <String>] [[-PSPath] <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

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

Parameters

-Passthru [<SwitchParameter>]

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 [<String>]

The protocol to stop (sites only).

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

-PSPath [<String[]>]

The path to the site or application pool.

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

-WarningAction [<ActionPreference>]

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

-WarningVariable [<String>]

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

Input Type

PSObject

Return Type

PSObject

Notes

Examples

EXAMPLE 1: Stopping a Web site

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

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