title: How to run PowerShell in CMD
body: <p>I'm trying to run a PowerShell script inside cmd command line. Someone gave me an example and it worked:</p>
  
  <pre><code>powershell.exe -noexit "&amp; 'c:\Data\ScheduledScripts\ShutdownVM.ps1'"
  </code></pre>
  
  <p>But the problem is my PowerShell script has input parameters, so I tried, but it doesn't work:</p>
  
  <pre><code>powershell.exe -noexit "&amp; 'D:\Work\SQLExecutor.ps1 -gettedServerName "MY-PC" ' "
  </code></pre>
  
  <p>The error is:</p>
  
  <blockquote>
    <p>The term 'D:\Work\SQLExecutor.ps1 -gettedServerName "MY-PC" ' is not recognized as the name of a cmdlet, function,</p>
  </blockquote>
  
  <p>How can I fix this problem?</p>