4.9 Remove an Entry of a Collection
-
var adminManager = WScript.CreateObject( "Microsoft.ApplicationHost.Wr itableAdminManager" ); adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST"; var configSection = adminManager.GetAdminSection( "system.webServer/de faultDocument", "MACHINE/WEBROOT/APPHOST" ); var collection = configSection.GetElementByName( "files" ).Collection; if ( collection.Count > 0 ) { collection.DeleteElement( 0 ); } adminManager.CommitChanges();