title: How to set the default argument to an array
body: <p>I'm trying to get my script to set an array as a <strong>default value</strong> for a script if the value is not given as an argument to my script and seem to be having some issues getting Powershell to understand that it's an array.</p>
  
  <p>I've set params as so:</p>
  
  <pre><code>param (
      [string]$games = @('Subnautica', 'Gearcity')
  )
  </code></pre>
  
  <p>The problem seems to be that <code>$games</code> now gets the value of a string "Subnautica Gearcity". At least that's the output of the variable. The comma seems to disappear and thus so does the array when trying to traverse it using <code>foreach ( $game in $games ) { random jabber }</code>.</p>