4.10 Edit the Configuration of APPHOST in a Location Tag

 var adminManager = WScript.CreateObject( "Microsoft.ApplicationHost.Wr
 itableAdminManager" );
 adminManager.CommitPath = "MACHINE/WEBROOT/APPHOST";
  
  
 var configSection = adminManager.GetAdminSection(
     "system.webServer/urlCompression",
     "MACHINE/WEBROOT/APPHOST/Default Web Site" );
 configSection.Properties.Item( "doDynamicCompression" ).Value = true;
  
 adminManager.CommitChanges();