4.14 Write into a Collection: Add an Entry for the defaultDocument Section for Site1 as a Location Tag

 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;
  
  
 var newElement = collection.CreateNewElement( "add" );
 newElement.Properties.Item( "value" ).Value = "newdefdoc.htm";
  
 collection.AddElement( newElement );
  
 adminManager.CommitChanges();