title: Set-WebConfigurationProperty fails
body: <p>I am trying to use powershell to set windowsauth on a site in IIS, this part of the script has worked in all environments so far and has now failed and I cannot figure out why.</p>
  
  <pre><code>Set-WebConfigurationproperty system.webServer/security/authentication/anonymousAuthentication -name enabled -value false -PSPath "IIS:\" -location $siteName
  Set-WebConfigurationproperty system.webServer/security/authentication/windowsAuthentication -name enabled -value true -PSPath "IIS:\" -location $siteName
  </code></pre>
  
  <p>Anyone got any ideas as to why this script would fail?</p>
  
  <p>I get a "The configuration section 'system.serviceModel' cannot be read because it is missing a section declaration"</p>
  
  <p>I can manually enable windows auth and the site spins up just fine.</p>
  
  <p>Cheers</p>