Stop-WebItem
Stops a site or an application pool.
Syntax
Default (Default)
Stop-WebItem
[-Passthru]
[-Protocol <String>]
[[-PSPath] <String[]>]
[<CommonParameters>]
Description
The Stop-WebItem cmdlet stops a site or an application pool.
Examples
Example 1: Stop a website
IIS:\> Stop-WebItem -PSPath "IIS:\Sites\Default Web Site"
This command stops the site named Default Web Site. No output is returned.
Example 2: Stop a website with feedback
IIS:\> Stop-WebItem -PSPath "IIS:\Sites\Default Web Site" -Passthru
Name ID State Physical Path Bindings
---- -- ----- ------------- --------
Default Web Site 1 Stopped C:\inetpub\wwwroot\Default Web http *:80:
Site
This command stops the site named Default Web Site and reports whether the site was stopped.
Parameters
-Passthru
Passes an object that represents the web item to the pipeline.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Protocol
Specifies the protocol binding of the site to stop. This parameter applies to sites only.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PSPath
Specifies the path to the site or application pool.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 1 |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | True |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.