Recent Articles

Migrating IIS7 Site Settings

Previously 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.

To export the web site settings (change "My Site" to the name of your site):

> %windir%\system32\inetsrv\AppCmd.exe LIST SITE "My Site" /config /XML > mysite.xml

To import the settings, do this:

> %windir%\system32\inetsrv\AppCmd.exe ADD SITE /IN < mysite.xml

Note the Application Pool will still need to be created manually including any SSL certificate and IP addresses binding need to be re-configured.