Search code examples
iisserverbiztalkwebdeploy

How to move individual IIS Virtual Directories [Applications] (and settings) to another server


I was playing with using MSDeploy, as follows:

"c:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:apphostconfig="Default Web Site" -dest:package=c:\dws.zip 

and I also looked at this PowerShell command:

Export-IISConfiguration -PhysicalPath "d:\appdata\IIS\Exports" -DontExportKeys

but both of those export the whole website. How can I cherry-pick the "applications" that I want to move?

For example, I want to get just the three that I have highlighted below. Installing BizTalk 2020 created BizTalkManagementService, and BizTalkOperationalDataServce, and deploying one of our BizTalk Applications will handle BizTalk/LNGTransactionManagement. The three in yellow are web services created in C#. I deployed them to our new BizTalk 2020 Dev server using Visual Studio, now I want to migrate them to the next higher environment. enter image description here

I know I can copy the files, but there might be some specific IIS settings (such as authentication, logging, etc...) that I would like to handle at the same time.


Solution

  • Both MSDeploy and PowerShell's Export-IISConfiguration cmdlet provide means to export the entire IIS configuration or a specific site, but they may not provide granular control over individual applications within a site. If you want to selectively export specific applications and their associated settings from the IIS configuration and then migrate them to another environment, you may need to manually export the IIS configuration and modify it as needed.

    You can export the entire site's configuration into a package using Export-IISConfiguration or msdeploy, which will include the entire site.

    After exporting the configuration, you need to manually edit the exported XML file to remove unwanted applications. The exported configuration file contains XML representing IIS configuration settings, which you can use a text editor or scripting tool to make these modifications.