Get-WebItemState
Get-WebItemState
Gets the run-time state of a site or an application pool.
Syntax
Parameter Set: Default
Get-WebItemState [[-PSPath] <String[]> ] [-Protocol <String> ] [ <CommonParameters>]
Detailed Description
Gets the run-time state of a site or an application pool.
Parameters
-PSPath<String[]>
The path to the application pool or site.
Aliases |
none |
Required? |
false |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Protocol<String>
Specifies the protocol binding for which information is returned, such as HTTP or FTP. TheProtocolparameter is applicable only when the cmdlet is used for sites.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- PSObject
Outputs
The output type is the type of the objects that the cmdlet emits.
- PSObject
Examples
-------------- EXAMPLE 1: Retrieve the State of all Web sites --------------
Returns information about the state of all the sites on the IIS server.
C:\PS>Get-WebItemState "IIS:\sites\*"
-------------- EXAMPLE 2: Retrieving the State of the Default Web Site using HTTP--------------
Value
-----
Started
Returns information about the HTTP binding on the Default Web Site.
IIS:\>Get-WebItemState '.\Default Web Site' -Protocol http