Web deploy (msdeploy), syncing everything but sites and pools (but include siteDefaults)
- by jishi
Today I do the following to sync two webservers but skip all site configuration:
msdeploy -verb:sync -source:webServer -dest:webServer,computerName=web25:8080
-skip:objectName=section,absolutePath=system.applicationHost/sites
-skip:objectName=section,absolutePath=system.applicationHost/applicationPools
However, this effectively also skip the siteDefaults, which I do like to sync (system.applicationHost/sites/siteDefaults)
There doesn't seem to be a way to "include" a section, to override the skip directive. And there doesn't seem to be a way to sync only the siteDefaults section from applicationHost either, since source appHostConfig only seem to sync a specified site, and not siteDefaults.
Maybe it is possible to "skip" using an Xpath expression or similar, to only skip the nodes, but include , but I find the documentation a bit confusing and my Xpath is rusty.