Lock-IisConfigurationSection

Locks an IIS configuration section so that it can't be modified/overridden by individual websites.

Syntax

Lock-IisConfigurationSection [-SectionPath] <String[]> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Locks configuration sections globally so they can't be modified by individual websites. For a list of section paths, run

C:\Windows\System32\inetsrv\appcmd.exe lock config /section:?

Beginning with Carbon 2.0.1, this function is available only if IIS is installed.

Parameters

Name Type Description Required? Pipeline Input Default Value
SectionPath String[]

The path to the section to lock. For a list of sections, run

C:\Windows\System32\inetsrv\appcmd.exe unlock config /section:?
true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Lock-IisConfigurationSection -SectionPath 'system.webServer/security/authentication/basicAuthentication'

Locks the basicAuthentication configuration so that sites can't override/modify those settings.