In the midst of migrating one my IIS 6 web servers with 30 or so applications on it, to new hardware. Coming from a linux background, I'm very surprised as to how difficult this seems to be.
Having played around with msdeploy, I came up with this command, which SHOULD work (btw, the replace is to move all the content to the C drive as the new server has no D partition):
C:\Program Files\IIS\Microsoft Web Deploy V2>msdeploy -verb:sync -source:webServer60,computerName=<IP>,userName=<USER>,password=<PASS> -replace:objectName=metaproperty,match="D:\\",replace="C:\\" -dest:webServer60 -enableLink:AppPoolExtension -whatif > msdeploy.log
However I get this error:
Error: The AppPoolNotFound dependency check found the AppPool '.Net 2' to be in use by the source data but not defined in source data or on the destination computer. Applications referencing this application pool will have configuration issues.
Error: The synchronization was stopped by the 'DependencyCheckFailOnError' rule because one or more dependency checks were triggered at the 'Error' level. Error count: 1.
The "helpful" people at the IIS forums, who seemingly only cater for VERY small users, give the workaround "simply create the app pool on the destination machine". This isn't really practical to do for the amount of app pools I have in place, multiplied by the number of servers in the farm. Surely there's an easier way.