title: MSDeploy to multiple servers
body: <p>I am looking for a way to deploy to multiple different environments. </p>
  
  <p>ie, dev, uat, prod1, and prod2 servers</p>
  
  <p>I am under the impression msdeploy could work for this. Currently we have something that deploys using a command like </p>
  
  <pre><code>"C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="D:\sourcepath" -dest:contentPath="D:\destpath", computerName=PRODSERVER1
  
  
  "C:\Program Files\IIS\Microsoft Web Deploy\msdeploy.exe" -verb:sync -source:contentPath="D:\sourcepath" -dest:contentPath="D:\destpath", computerName=PRODSERVER2
  </code></pre>
  
  <p>This would work, but in the application I'm developing that needs deploying has a database connection involved, which needs to be changed per environment. </p>
  
  <pre><code>&lt;connectionStrings&gt;
          &lt;add name="DEVServer" connectionString="Data Source=DEVServer\SQLinstance;Initial Catalog=DBNAME;User ID=sqluser;Password=sqlpassword" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  </code></pre>
  
  <p>Also, since this is a WCF service I have an Identity for the endpoint that would need to be changed  per environment as well</p>
  
  <pre><code>&lt;identity&gt;
              &lt;dns value="DEVServer" /&gt;
  &lt;/identity&gt;
  </code></pre>
  
  <p>Is there a way to parameterize this? Should I set up multiple web.config files? What is the easiest route to go about this?</p>