Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,34 @@ Set-WebConfigurationProperty -Name <String> -InputObject <Object> [-Clr <String>
```

## DESCRIPTION
TheSet-WebConfigurationPropertycmdlet changes the value of an IIS configuration property.
The Set-WebConfigurationProperty cmdlet changes the value of an IIS configuration property.
The element can be specified as a configuration section or an XPath query.
Globbing, the use of wildcards, is supported.

## EXAMPLES

### -------------- EXAMPLE 1: Change the extension of all handlers mapped to .aspx --------------
### -------------------------- EXAMPLE 1 --------------------------
```
IIS:\>Set-WebConfigurationProperty "//handlers/add[@path='*.aspx']" -PSPath IIS:\ -Name path -Value "*.mspx"
```

The cmdlet changes all handler paths to *.mspx that were mapped to *.aspx.

### -------------- EXAMPLE 2: Setting new Bindings on an existing Web site --------------
### -------------------------- EXAMPLE 2 --------------------------
```
IIS:\>set-webconfigurationproperty '/system.applicationHost/sites/site[@name="DemoSite"]' -PSPath IIS:\ -Name Bindings -Value (@{protocol="http";bindingInformation="*:80:DemoSite1"},@{protocol="http";bindingInformation="*:80:DemoSite2"})
```

The cmdlet sets new bindings on an existing Web site.
The original bindings are replaced.

### -------------------------- EXAMPLE 3 --------------------------
```
IIS:\>set-webconfigurationproperty 'system.webserver/security/authentication/basicauthentication' -PSPath 'IIS:\sites\default web site\' -Name defaultlogondomain -Value 'contoso.com'
```

The cmdlet sets the default domain of Basic Authentication settings on an existing Web site. Note that for this example to work, Custom Site Delegation for this type of Authentication must be set to Read/Write at the site level.

## PARAMETERS

### -AtElement
Expand Down Expand Up @@ -148,7 +155,7 @@ Accept wildcard characters: False
```

### -Force
If theForceparameter is used it causes the configuration property setting to be set at a level in the configuration hierarchy above a lock in the configuration.
If the Force parameter is used it causes the configuration property setting to be set at a level in the configuration hierarchy above a lock in the configuration.

```yaml
Type: SwitchParameter
Expand Down