Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a site in IIS 7.5 via Powershell; however, the site inherited the parent handler mappings and one of the wildcard script mappings causes problems for this particular application. Is there a way to script removing a wildcard script mapping?

share|improve this question
Do you need to do this from a script or IIS MMC? – Kev May 2 '12 at 19:26
I need to do it from a script because I need the setup of the site to be 100% hands-off – Alex May 2 '12 at 20:13

If you have imported the module WebAdministration, you can use the Set-ItemProperty command on the IIS: drive, such as:

Set-ItemProperty "IIS:\Sites\Default Web Site" -name "Bindings" -value  @{protocol="HTTP";port="80"}

Note that this will replace all of your site bindings, so you will need to enter each one that you want to have in the value parameter.

share|improve this answer
up vote 0 down vote accepted

Thanks for the suggestion. I actually found a command that does exactly what I need:

C:\Windows\System32\inetsrv\appcmd.exe set config "<SITE_NAME>" -section:system.webServer/handlers /-"[name='<NAME_OF_HANDLER_MAPPING']"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.