Rename virtual directory on Windows Server 2008 (IIS7 )

njr101 picture njr101 · Apr 28, 2009 · Viewed 47.1k times · Source

How can I rename a virtual directory (i.e., change the Virtual Path name) in IIS7 on Windows Server 2008?

In Server Manager I click on the application, select Basic Settings, but the box showing the current Alias is greyed out and I can't edit it.

Answer

Brian Grinstead picture Brian Grinstead · Sep 2, 2010

I found a way to do this using the built in appcmd.exe tool. If you wanted to change your virtual directory "Images" inside your application "OldApplicationName" type this into the command line.

%systemroot%\system32\inetsrv\appcmd set vdir "Default Web Site/OldApplicationName/Images" -path:/Images2

More details, including how to rename applications here: http://www.foliotek.com/devblog/rename-applications-and-virtual-directories-in-iis7/