Get-WebItemState
Gets the run-time state of a site or an application pool.
Syntax
Default (Default)
Get-WebItemState
[-Protocol <String>]
[[-PSPath] <String[]>]
[<CommonParameters>]
Description
The Get-WebItemState cmdlet gets the run-time state of a site or an application pool.
Examples
Example 1: Get the state of all websites
C:\PS>Get-WebItemState -PSPath "IIS:\sites\*"
This command returns information about the state of all the sites on the IIS server.
Example 2: Get the state of the default website using HTTP
IIS:\> Get-WebItemState -PSPath ".\Default Web Site" -Protocol "http"
Value
-----
Started
This command returns information about the HTTP binding on the default website.
Parameters
-Protocol
Specifies the protocol binding for which information is returned, such as HTTP or FTP. This parameter is for 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 application pool or site.
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.