Finally figured this out... The above examples should be using fixed-width fonts to show the details of the syntax properly
I was getting the error "The virtual directory does not exist." when clicking on the virtual directory in IIS after using a command line statement such as this (same as example above for illustration purposes):
appcmd add vdir /app.name:contoso/marketing/ /path:/photos /physicalPath:c:\images
The problem is that there is an extra trailing slash in the app.name field (after marketing), the correct syntax is instead:
appcmd add vdir /app.name:contoso/marketing /path:/photos /physicalPath:c:\images
Hope this helps someone.