4.12 Get a Section for Write: Get the defaultDocument Section and Toggle the Enabled Attribute

 var adminManager = WScript.CreateObject( "Microsoft.ApplicationHost.Wr
 itableAdminManager" );
 adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
  
  
 var configSection = adminManager.GetAdminSection( "system.webServer/de
 faultDocument", "MACHINE/WEBROOT/APPHOST" );
 configSection.Properties.Item( "enabled" ).Value = true;
 adminManager.CommitChanges();