Hello,
I am aware that there is a solved forum entry. But since the solution does not work for me I have to open a new thread. I am afraid the other one isn't looked at anymore since it is published as solved.
This is the thread:
http://forums.iis.net/t/1173635.aspx/1?Scripting+Url+Rewrite+Rules+with+WebAdministration
It says there: You can also disable your rules by the command like:
Set-WebconfigurationProperty '/system.webserver/rewrite/rules/rule[@name="YourRuleName"]' -Name enabled -Value false
I tried to de-activate a rewrite rule on my server on the Default Web Site with the name "Redirect from blog" using your command above - no luck:
Set-WebconfigurationProperty '/system.webserver/rewrite/rules/rule[@name="Redirect from blog"]' -Name enabled -Value false
Instead, I get the following error message:
WARNING: Target configuration object '/system.webserver/rewrite/rules/rule[@name="Redirect from blog"] is not found at path 'MACHINE/WEBROOT/APPHOST'.
Do you have an idea of what went wrong?
Obviously the rewrite rule is not where the system expects it. Where would I have to search for it or what in the command would I have to adapt?
There are only a few sites on my machine and the rule that I want to disable is on the "Default Web Site".
Thank you and regards
Andi