I can add a virtual directory to IISEXPRESS by editing applicationhost.config. On the surface APPCMD provides commands for managing sites, applications and virtual directories. For example,
$appcmd = "c:\Program Files (x86)\IIS Express\appcmd.exe" .$appcmd list site "MySite"
shows me the site,. however none of these commands seem to work:
$appcmd = "c:\Program Files (x86)\IIS Express\appcmd.exe" .$appcmd list apps site.name:"MySite" .$appcmd list vdirs app.name:"MySite" .$appcmd add vdir /app.name:"MySite" /path:/Index /physicalPath:"C:\Foo\Index"
Are these not supposed to work and the only way of adding a virtual directory is through the configuration file?