title: How do I define setParamFile using the MSDeploy API
body: <p>How do I define the -setParamFile parameter from MSDeploy.exe using the MSDeploy API?</p>
  
  <p>I'm trying to write the equivalent of the following in powerShell:</p>
  
  <pre><code>msdeploy -verb:sync -source:package="c:\MyZip.zip" -dest:auto -setParamFile="c:\StagingParameters.xml"
  </code></pre>
  
  <p>Here's what I have so far:</p>
  
  <pre><code>[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Web.Deployment")
  $destBaseOptions   = new-object Microsoft.Web.Deployment.DeploymentBaseOptions
  $syncOptions       = new-object Microsoft.Web.Deployment.DeploymentSyncOptions
  $deploymentObject = [Microsoft.Web.Deployment.DeploymentManager]::CreateObject("package","C:\MyZip.zip")
  
  #TODO -setParamFile="c:\StagingParameters.xml"
  
  $deploymentObject.SyncTo("auto","",$destBaseOptions,$syncOptions);
  </code></pre>