Freigeben über


Get-WebItemState

Get-WebItemState

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

Syntax

Get-WebItemState [-Protocol <String>] [[-PSPath] <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

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

Parameters

-Protocol <String>

Specifies the protocol binding for which information is returned, such as HTTP or FTP. The Protocol parameter is applicable only when the cmdlet is used for sites.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-PSPath <String[]>

The path to the application pool or site.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

2

-WarningAction <ActionPreference>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WarningVariable <String>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

PSObject.

Return Type

PSObject.

Notes

Examples

EXAMPLE 1: Retrieving 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.