title: How to pass a list of files as parameters to a powershell script
body: <p>How does one pass a list of files as parameters to a Powershell script?</p>
  
  <pre><code>param
  (
      [String[]]$files
  )
  
  echo $files
  </code></pre>
  
  <p>When I try to run it</p>
  
  <pre><code>PS D:\&gt; &amp; '.\merge outputs.ps1' *.dat
  </code></pre>
  
  <p>it prints</p>
  
  <pre><code>*.dat
  </code></pre>
  
  <p>but I expected something similar to</p>
  
  <pre><code>file1.dat
  file2.dat
  ...
  fileN.dat
  </code></pre>