title: How to run a powershell script file from within a bat file and pass multiple parameters
body: <p>I want to call test.bat which again triggers the Powershell.exe with the file test</p>
  
  <p><strong>test.bat:</strong></p>
  
  <pre><code>Powershell.exe -ExecutionPolicy Bypass -File "test1.ps1 -Param1 Value1 -Param2 Value2"
  </code></pre>
  
  <p><strong>test1.ps1:</strong></p>
  
  <pre><code>param{$Tag,$CommitId}
  
  Write-Host $Tag
  Write-Host $CommitId
  </code></pre>
  
  <p>Both files are put on the same directory.</p>
  
  <p>At the moment I get an error that my file does not have a .ps1 extension but thats not true... but I guess that is because I pass the parameters in a wrong way...</p>
  
  <p>So how do I correctly pass the parameters to the call in the My.bat?</p>