Adding GET HEAD and POST Verbs in IIS Powershell
<p>I am trying to add three HTTP request filters to my applicationhost.config file using the below:</p>

<pre><code>Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/security/requestFiltering/verbs' -Value @{VERB="GET";allowed="True"} -Name collection
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/security/requestFiltering/verbs' -Value @{VERB="HEAD";allowed="True"} -Name collection
Set-WebConfigurationProperty -PSPath 'MACHINE/WEBROOT/APPHOST' -Filter 'system.webServer/security/requestFiltering/verbs' -Value @{VERB="POST";allowed="True"} -Name collection
</code></pre>

<p>However, each subsequent line overrides the previous one and I can only add one line it seems. I want to add all three like this:</p>

<pre><code>        &lt;verbs allowUnlisted="false"&gt;
            &lt;add verb="GET" allowed="true" /&gt;
            &lt;add verb="HEAD" allowed="true" /&gt;
            &lt;add verb="POST" allowed="true" /&gt;
        &lt;/verbs&gt;
</code></pre>

<p>All I end up with is the first <code>GET</code> being written then <code>HEAD</code> overriding the <code>GET</code> and then <code>POST</code> overriding the <code>GET</code>...I just want all three listed.</p>

<p>Any ideas?</p>