[ACCEPTED]-Renaming applications in IIS 7.0-appcmd

Accepted answer
Score: 31

I recently had to do this and I think you 7 are better off using appcmd because ,as 6 you said, we don't know what other changes 5 may occur behind the scenes


appcmd list app

APP "Default Web Site/" (applicationPool:DefaultAppPool)
APP "Default Web Site/develop" (applicationPool:mypool)
APP "Default Web Site/develop/xyz" (applicationPool:mypool)

In my 4 case, I did have to rename starting from 3 the child. Otherwise, appcmd won't find 2 the child site.

appcmd set app "Default Web Site/develop/xyz" -path:/B455/xyz
appcmd set app "Default Web Site/develop" -path:/B455


appcmd list app

APP "Default Web Site/" (applicationPool:DefaultAppPool)
APP "Default Web Site/B455" (applicationPool:mypool)
APP "Default Web Site/B455/xyz" (applicationPool:mypool)

Note: appcmd can be 1 found under %windir%\system32\inetsrv

Score: 12

I have used appcmd recently to change a website 3 application name with no issues. I ran a 2 cmd prompt as admin then:-

cd c:\windows\syswow64\inetsrv\
appcmd set app WebsiteName/applicationname -path:"/newapplicationname"

Works a treat 1 :)

Score: 4

it's very easy with Powershell:

rename-item IIS:\Sites\yoursitename\yourappname\ newappname

if the IIS:\ namespace 5 is missing, be sure you have IIS Management 4 Scripts and Tools installed on server(s). You 3 can install it from Server Manager -> Web 2 Server Role -> Role Services -> Management 1 Tools -> IIS Management

Score: 3

All that is happening here, regardless of 9 which method you use, is that the name of 8 the application path is changed.

There's 7 really no magic to it. Obviously any paths 6 in your web application that depended on 5 the old path name would need to be renamed.

You 4 might find my answer to this question useful 3 for gaining an understanding of the mechanics 2 of virtual directories and applications 1 in IIS7:

Using ServerManager to create Application within Application

More Related questions