Migrating IIS7 Site Settings

In IIS 5 and 6, you could export Site configuration settings and import them back on another machine making server migration very easy. When IIS 7 came along, we lost that command in the IIS Manager. Fortunately, there is now a new set of command lines that can do almost the same thing.

Export the web site settings: %windir%\system32\inetsrv\AppCmd.exe LIST SITE "My Site" /config /XML > mysite.xml

Import the settings, do this: %windir%\system32\inetsrv\AppCmd.exe ADD SITE /IN < mysite.xml

The Application Pool has be created manually.

This entry was posted in IIS7 and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *