TheGeekery

The Usual Tech Ramblings

IIS7 & AppCmd Handyness...

Part of our move was including the building of the new DR environment. Like most people, we cheated, and cloned the production servers to the new environment1. One issue was host naming changes. In our DR environment, the host names change due to the location, and roll of the servers. This means that various IIS config options are now incorrect. This is easily fixed with the new AppCmd2 in IIS7.

1
appcmd set vdir /vdir.name:"SiteName/virtual_dir" /physicalPath:"\\NewServer\Images"

The command is relatively easy to understand. /vdir.name is the path to the site, and virtual directory, and /physicalPath is the new path. Easy huh?


  1. The bonus of using identical hardware across environments makes this easier

  2. Microsoft’s replacement for the iisadmin.vbs scripts

Comments