0

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.

  • 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. – Lex Li Jun 05 '22 at 00:17

0 Answers0