Get-WebConfigFile

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

Syntax

Get-WebConfigFile
   [[-PSPath] <String[]>]
   [<CommonParameters>]

Description

The Get-WebConfigFile cmdlet gets the physical path of the Internet Information Services (IIS) configuration file at the specified IIS module namespace path.

Examples

Example 1: Open the Web.config file for the default website

IIS:\> Notepad (Get-WebConfigFile -PSPath "IIS:\Sites\Default Web Site")

This command uses Notepad to open the Web.config file for the default website.

Optional Parameters

-PSPath

Specifies the IIS module namespace path to the site that contains the Web.config file.

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