Get-WebItemState

Gets the run-time state of a site or an application pool.

Syntax

Get-WebItemState
   [-Protocol <String>]
   [[-PSPath] <String[]>]
   [<CommonParameters>]

Description

Gets the run-time state of a site or an application pool.

Examples

-------------- EXAMPLE 1: Retrieve the State of all Web sites --------------

C:\PS>Get-WebItemState "IIS:\sites\*"

Returns information about the state of all the sites on the IIS server.

-------------- EXAMPLE 2: Retrieving the State of the Default Web Site using HTTP--------------

IIS:\>Get-WebItemState '.\Default Web Site' -Protocol http

Value


Started

Returns information about the HTTP binding on the Default Web Site.

Optional Parameters

-PSPath

The path to the application pool or site.

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

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.

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

Inputs

PSObject

Outputs

PSObject