Export (0) Print
Expand All
Expand Minimize

Get-WebConfiguration

Get-WebConfiguration

Gets an IIS configuration element at the specified path.

Syntax

Get-WebConfiguration [-Recurse] [-Metadata] [-Location <String[]>] [-Filter] <String[]> [[-PSPath] <String[]>] [-WarningAction <ActionPreference>] [-WarningVariable <String>] [<CommonParameters>]

Detailed Description

Gets the IIS configuration element at the specified location.

Parameters

-Recurse <SwitchParameter>

Returns all elements contained in the specified location and the subsequent hierarchy.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Metadata <SwitchParameter>

Returns configuration metadata such as encryption or locking settings.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Location <String[]>

Location of the configuration setting. Location tags are frequently used for configuration settings that must be set more precisely than per application or per virtual directory. For example, a setting for a particular file or directory could use a location tag. Location tags are also used if a particular section is locked. In such an instance, the configuration system would have to use a location tag in one of the parent configuration files.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-Filter <String[]>

Specifies the configuration path for which the configuration elements are returned.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

1

-PSPath <String[]>

Specifies the configuration path. This can be either an IIS configuration path in the format computer name/webroot/apphost, or the IIS module path in this format IIS:\sites\Default Web 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: Querying authentication settings

IIS:\>Get-WebConfiguration system.webServer/security/authentication/* 'IIS:\sites\Default Web Site' -Recurse | where {$_.enabled -eq 'true'} | format-list

This example queries for all authentication settings specified under the Default Web Site.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft