As one of Web server’s c: drive was crashed and there was an urgent requirement of creating all websites one newly formatted C:\.
I have already configured DR for websites on remote location using MSDEPLY tool which synchronizes all the websites configuration and Contents.
- Taken remote of DR web server.
- Exported all Application Pools from the Server with below command
%windir%\system32\inetsrv\appcmd list apppool /config /xml > c:\apppools.xml
- Exported all Websites along with Applications ( Virtual Directories ) with below command
%windir%\system32\inetsrv\appcmd list site /config /xml > c:\sites.xml
- Copied both the files from DR webserver to newly formatted C: \
- Then Task is to import all application pools and Websites in IIS 7.5
- To do so first open INETMGR and delete all Applications and default Website from it ( as its newly formatted we don’t have any important website configured on it)
- First Import Application pools which can be done with below command on CMD
%windir%\system32\inetsrv\appcmd add apppool /in < c:\apppools.xml
- Then import all Websites along with Applications to do so use below command
%windir%\system32\inetsrv\appcmd add site /in < c:\sites.xml
- After all done , IISReset /stop and then IISReset /start
All done J , All websites along with its corresponding Application pools will be created and sites will be browsed.