Get-WebConfigFile

Get-WebConfigFile

Gets the file system path of the Web.config file.

Syntax

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

Detailed Description

Gets the physical path of the IIS configuration file at the specified IIS module namespace path.

Parameters

-PSPath <String[]>

The IIS module namespace path to the site containing the Web.config file.

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

.

Return Type

.

Notes

Examples

EXAMPLE 1: Opening the Web.config file for the Default Web Site

IIS:\>notepad (Get-WebConfigFile 'IIS:\Sites\Default Web Site')

This example demonstrates how to use Notepad to open the web.config file for the Default Web Site.