title: How to pass string variable to invoke-expression?
body: <p>I am running the below powershell command:</p>
  
  <pre><code>$cmd = "xxx.exe"
  
  Invoke-Command -ComputerName localhost {Invoke-Expression $cmd}
  </code></pre>
  
  <p>However I get the error:</p>
  
  <pre><code>Cannot bind argument to parameter 'Command' because it is null.
  
  + CategoryInfo          : InvalidData: (:) [Invoke-Expression], ParameterB
  indingValidationException
   + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
  icrosoft.PowerShell.Commands.InvokeExpressionCommand
  </code></pre>