title: Start-Process Variables In -ArgumentList
body: <p>I was wondering if someone with more expertise could help me with a little problem I'm having with using Variables in <code>-ArgumentList</code> when using <code>Start-Process</code>.</p>
  
  <p>If I run the Exe without using <code>Start-Process</code></p>
  
  <pre><code>.\DeploymentServer.UI.CommandLine.exe register --estNumber $Number --postcode $PostCode --password $Password
  </code></pre>
  
  <p>everything works fine, the command runs and the software is registered.</p>
  
  <p>If I try</p>
  
  <pre><code>Start-Process .\DeploymentServer.UI.CommandLine.exe -ArgumentList "register --estNumber $Number --postcode $PostCode --password $Password" -Wait -NoNewWindow
  </code></pre>
  
  <p>or</p>
  
  <pre><code>$Arguments = "register --estNumber $Number --postcode $PostCode --password $Password"
  Start-Process .\DeploymentServer.UI.CommandLine.exe -ArgumentList $Arguments -NoNewWindow -Wait
  </code></pre>
  
  <p>the command runs but is unable to register, stating that it can not match the details provided. So I'm assuming the issue lies either in the passing of the arguments to <code>Start-Process</code>, or <code>-ArgumentList</code> interpreting the variables in the string. Am I missing something really simple here? Possibly to do with the <code>$</code> in the <code>-ArgumentList</code>?</p>