We help IT Professionals succeed at work.

Moving +275 sites from IIS7 server to IIS7 server

trg_dk asked
I'm trying to move +275 sites from a Win2008 R2 server to another server also 2008R2.

I am looking for some automated solution for this. The files is FTP'd to the new server, but setting up almost 300 sites manually is not an option.

I've been looking at msdeploy but it seems like I need to generate a package per site - can I automate this ??

I'm a bit in a hurry - so any advide also to commercial tools are welcome!

Watch Question

Hi trg_dk

I might be wrong, but I remember that there is an option in msdeploy to package the entire server IIS setup.  I can't the info, but will continue looking for.

Below are other alternatives

You could also try the export import function

Alternatively you could sync them (I don't think this option will work for you though)
1. Always make a backup of the destination and source servers. Even if you are just testing, it allows you to easily restore the state of your server. Run the following command to backup an IIS 7 server:

    %windir%\system32\inetsrv\appcmd add backup "PreMsDeploy"

2. Install the remote agent service on the source or the destination depending on if you want to "pull" the data from a remote source or "push" the data to a remote destination.

3. Start the service on the computer.

    net start msdepsvc

4. Run the following command to validate what would happen if the synchronization were run. The -whatif flag will not show every change; it will just show an optimistic view of what might change if everything succeeds (for example, it won't catch errors where you can't write to the destination.)

    Pushing to remote destination, running on source computer (the computerName argument identifies the remote destination computer).
    msdeploy -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server1 -whatif > msdeploysync.log

    Pulling from a remote source, running on destination machine (the computerName argument identifies the remote source computer).
    msdeploy -verb:sync -source:apphostconfig="Default Web Site",computername=Server1 -dest:apphostconfig="Default Web Site" -whatif > msdeploysync.log

5. After verifying the output, run the same command again without the -whatif flag:

    Pushing to remote destination, running on source machine
    msdeploy -verb:sync -source:apphostconfig="Default Web Site" -dest:apphostconfig="Default Web Site",computername=Server1 > msdeploysync.log

    Pulling from a remote source, running on destination machine
    msdeploy -verb:sync -source:apphostconfig="Default Web Site",computername=Server1 -dest:apphostconfig="Default Web Site" > msdeploysync.log


"Web server migration and synchronization:

    * Ability to synchronize or migrate the entire Web server, a Web site or application.
    * Synchronizes only the data that has changed.
    * Ability to detect missing dependencies during synchronization.
    * Automatically gathers content, IIS configuration, SSL certificates and ASP.NET configuration when you sync a Web site."

Source: http://www.iis.net/download/WebDeploy


Hi and thanks for your links.

I also found msdeploy and the articles. But I don't get how to move the entire server (or package it)

It seems like I need to do it one by one ??

Within msdeploy try this

On the current IIS box

msdeploy -verb:sync -source:webserver70 -dest:archivedir=c:\mymagicdir

To instantiate the new IIS server,

msdeploy -verb:sync -source:archivedir=c:\mymagicdir -dest:webserver70

I believe you can do this if you install the IIS7 PowerShell snapin.  


Moomin83 - I'm not sure what to put instead of webserver70

The IIS name on my server is LOFT4365 - which returns an error

Error : Could not find the provider... se screencap attached...

Hi trg_dk

Given the screenshot. Am I correct in assuming this server is not part of a domain?


Moomin83 - Yes you are correct. The server is standalone in a hosting center - moving the sites to a new location.

hi trg_dk

Here is another link you can try: https://help.maximumasp.com/KB/a745/easily-migrate-your-web-server-to-a-new-server.aspx
It seems like it is based on moving an entire IIS6 server to IIS7 but I'm sure it should work none the less.



Well - something's going on, the server is doint "something"...

Have anyone of you, seen a tool that will move the sites in IIS only - I already have the files syncronized using FTPsynchronizer - so really all I need is to automate the creation of the sites in IIS with bindings etc...
Did you try the PowerShell option?


Must admit no, I couldn't really find anything in the documentation about moving a complete server...


Ended up doing a XML import - but thanks anyhows!!

Explore More ContentExplore courses, solutions, and other research materials related to this topic.