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.
Hold down the Windows key, press the letter X, and then click Control Panel. Click Administrative Tools, and then double-click Internet Information Services (IIS) Manager.
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/
For as far as I know, there is no way to do it. You can only delete the virtual directory, and recreate it with the same settings.
Or at least, you can't do it through the GUI. There might be ways to do it through scripting in PowerShell for example. But I don't know how.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With