Score:0

Appcmd.exe: How to set config the virtual directory by using it parent path?

tr flag

Using Appcmd.exe, I am trying to change the configuration of the virtual directory using its parent path "IIS://localhost/w3svc/5/ROOT/Site123" where, 5 - is the parent site ID, Site123 - is name of the virtual directory. Below is the cmd I have tried to set config.

C:\\WINDOWS\\system32\\inetsrv\\appcmd.exe set config "IIS://localhost/w3svc/5/ROOT/Site123" /section:system.webServer/rewrite/rules /"[name='ReverseProxyInboundRule'].enabled:false" /commit:site

But I am getting below error.

ERROR ( message:Cannot find SITE object with identifier "IIS://localhost/w3svc/5/ROOT/Site123". )

It would be helpful if any helps me to set configuration for virtual directory using its path "IIS://localhost/w3svc/5/ROOT/Site123", which is the only input I having to set configuration. Thanks in advance.

Lex Li avatar
vn flag
https://docs.microsoft.com/en-us/iis/get-started/getting-started-with-iis/getting-started-with-appcmdexe You can learn what's the right arguments to pass to `appcmd`, but the legacy `IIS://` paths for ADSI are no longer supported.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.