WebConfigPropertyCollections manages collection-based properties in IIS web.config configuration files.
Use this resource when you need to manage items within IIS configuration collections (arrays of elements in web.config). This is used for settings that are defined as collections, such as adding custom HTTP headers, MIME types, handler mappings, or module entries.
Source |
|
DSC Resource |
|
Documentation |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
Mandatory |
Hashtable[] |
set of web config properties |
| Parameter | Attribute | DataType | Description | Allowed Values |
|---|---|---|---|---|
WebsitePath |
Key |
String |
Path to website location (IIS or WebAdministration format). |
|
Filter |
Key |
String |
Filter used to locate property to update. |
|
CollectionName |
Key |
String |
Name of the property collection to update. |
|
ItemName |
Key |
String |
Name of the property collection item to update. |
|
ItemKeyName |
Key |
String |
Name of the key of the property collection item to update. |
|
ItemKeyValue |
Key |
String |
Value of the key of the property collection item to update. |
|
ItemPropertyName |
Key |
String |
Name of the property of the property collection item to update. |
|
ItemPropertyValue |
String |
Value of the property of the property collection item to update. |
||
Ensure |
String |
Indicates if the property and value of the property collection item should be present or absent. |
|
WebConfigPropertyCollections:
Items:
- WebsitePath: MACHINE/WEBROOT/APPHOST
Filter: system.webServer/isapiFilters
CollectionName: .
ItemName: filter
ItemKeyName: name
ItemKeyValue: ASP.Net_2.0.50727-64
ItemPropertyName: enabled
ItemPropertyValue: true
- WebsitePath: MACHINE/WEBROOT/APPHOST
Filter: system.webServer/isapiFilters
CollectionName: .
ItemName: filter
ItemKeyName: name
ItemKeyValue: ASP.Net_4.0_64bit
ItemPropertyName: enabled
ItemPropertyValue: true
- WebsitePath: MACHINE/WEBROOT/APPHOST
Filter: system.webServer/security/isapiCgiRestriction
CollectionName: .
ItemName: add
ItemKeyName: path
ItemKeyValue: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll
ItemPropertyName: allowed
ItemPropertyValue: True
- WebsitePath: MACHINE/WEBROOT/APPHOST
Filter: system.webServer/security/isapiCgiRestriction
CollectionName: .
ItemName: add
ItemKeyName: path
ItemKeyValue: C:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll
ItemPropertyName: groupId
ItemPropertyValue: ASP.NET v2.0.50727