title: How do you change the allowDefinition section attribute using appcmd in IIS 7?
body: <p>Is it possible to use appcmd to change the value of allowDefinition? Specifically I'm try to enable changes to the httpCompression module at the application level.</p>
  
  <p>Modifying the applicationHost.config by manually changing the following line:</p>
  
  <pre><code>&lt;section name="httpCompression" allowDefinition="AppHostOnly" overrideModeDefault="Deny" /&gt;
  </code></pre>
  
  <p>To</p>
  
  <pre><code>&lt;section name="httpCompression" allowDefinition="MachineToApplication" overrideModeDefault="Allow" /&gt;
  </code></pre>
  
  <p>allows me to then execute the following appcmd commands:</p>
  
  <pre><code>appcmd set config "website name" /section:httpCompression /noCompressionForProxies:false
  appcmd set config "website name" /section:httpCompression /noCompressionForHttp10:false
  </code></pre>
  
  <p>However I need a solution that does not rely on manually editing the applicationHost.config</p>