powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Add-WebConfigurationProperty



NAME
Add-WebConfigurationProperty

SYNOPSIS
Adds a property to an IIS configuration section.

SYNTAX
Add-WebConfigurationProperty -Name [-Type ] [-Value ] [-AtElement ] [-AtIndex
] [-AtName ] [-Force] [-Location ] [-Filter] [[-PSPath] ] [-WarningA
ction ] [-WarningVariable ] [-WhatIf] [-Confirm] []


DESCRIPTION
Adds a property to an IIS configuration section. Globbing is supported.


PARAMETERS
-Name
The name of the IIS configuration property to add.

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

-Type
The type of property to add.

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

-Value
The value of the configuration property to add.

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

-AtElement
The element at which the value is to be inserted.

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

-AtIndex
The index at which the property is to be inserted.

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

-AtName
The property name at which the property is to be inserted.

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

-Force
Forces the property to be written. If a lock exists, the property is written at a level in the configuration ab
ove the lock.

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

-Location
Location of the configuration property setting. Location tags are usually used for configuration settings that
need to be more granular than per application or per virtual directory. Settings for particular files or direct
ory are an example. Location tags are also used is if a particular section is locked. If so the configuration s
ystem has to use location tags in one of the parent configuration files.

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

-Filter
Specifies the IIS configuration section or an XPath query that returns a configuration element.

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

-PSPath
Specifies the configuration path. This can be either an IIS configuration path (e.g. machine/webroot/apphost) o
r 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 a Default Document --------------

C:\PS>Add-WebConfigurationProperty //defaultDocument/files "IIS:\sites\Default Web Site" -AtIndex 0 -Name collecti
on -Value "new-index.html"


This command adds a new Default Document named "new-index.html" to the top of the list of existing documents.






RELATED LINKS
Remove-WebConfigurationProperty