powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Add-WebConfigurationLock



NAME
Add-WebConfigurationLock

SYNOPSIS
Locks an IIS configuration section or element

SYNTAX
Add-WebConfigurationLock -Type [-Force] [-Passthru] [-Location ] [-Filter] [[-PSPath]
] [-WarningAction ] [-WarningVariable ] [-WhatIf] [-Confirm] [ s>]


DESCRIPTION
Locks an IIS configuration section, element, or attribute.


PARAMETERS
-Type
Specifies the type of configuration lock to add.

Required? true
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Force
Forces the configuration lock.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Passthru
Passes an object representing the configuration lock to the pipeline

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Location
The location at which the configuration lock is to be inserted.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Filter
An XPath filter expression.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-PSPath
Specifies the configuration path to the site on which to set the lock. The path can be either an IIS configurat
ion path (e.g. machine/webroot/apphost) or the IIS module path (e.g. 'IIS:\sites\Default Web Site').

Required? false
Position? 2
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-WarningAction


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WarningVariable


Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Describes what would happen if you executed the command without actually executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
Prompts you for confirmation before executing the command.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS



NOTES




-------------- EXAMPLE 1: Adding and removing configuration locks --------------

C:\PS>Add-WebConfigurationLock -Type general -Filter //asp
Remove-WebConfigurationLock -Filter //asp
Add-WebConfigurationLock -Type inclusive -Filter //asp/@lcid
Remove-WebConfigurationLock -Filter //asp/@lcid
Add-WebConfigurationLock -Type exclusive -Filter //asp/@lcid


This example demonstrates how to add and remove inclusive and exclusive locks using a filter.






RELATED LINKS
Unkown
Remove-WebConfigurationLock