How to copy IIS configuration from a server to another

configurationiis-7windows-server-2008

I have an already configured IIS on a Windows Server 2008 SP2.

I would like to replicate the same configuration on a brand new IIS installed on another 2008 SP2 server. Of course the hostname and IP will change, but the other machine configurations are the same.

How do I copy the configuration from the first server to the new server?

Best Answer

Most configuration settings for IIS 7+ are in one file:

%systemroo%\System32\inetsrv\config\applicationHost.config

You can try just copying this file from one server to another. Make a backup of the target file first.

Certain settings in this file are machine specific:

  • The sessionKey values under configProtectedData,
  • When using Client Certificates, passwords under security authentication

If you have made changes to the machine.config and global web.config files, you may need to apply them to your new server as well.

The few IIS settings still in the registry are usually only-non-default if you changed them yourself in the registry. If you haven't, you can ignore them.