Stop-WebItem

Stops an application pool or a site.

Syntax

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

Description

TheStop-WebItemcmdlet is used to stop a Site or an application pool.

Examples

-------------- EXAMPLE 1: Stop a Web site --------------

IIS:\>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 --------------

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

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

Name ID State Physical Path Bindings


Default Web Site 1 Stopped C:\inetpub\wwwroot\Default Web http *:80:

Site

Optional Parameters

-PSPath

The path to the site or application pool.

Type:String[]
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Passthru

Passes an object that represents the Web item to the pipeline.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Protocol

The protocol binding of the site to stop (sites only).

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSObject

Outputs

PSObject