title: Call a script in SharePoint PowerShell post-deployment command line with array in parameters
body: <p>I try to call on post-deployment action a powerShell script with an array parameter, but without success.</p>
  
  <p>Here is the script:</p>
  
  <pre><code>param(
          [string[]]$ModelNameList = "DefaultModelName"
      )
  
    Write-Host "Number of Models is: $($ModelNameList.Count)"
  </code></pre>
  
  <p>and this is the post-deployment command line:</p>
  
  <pre><code>%windir%\sysnative\windowspowershell\v1.0\powershell -File "$(ProjectDir)Scripts\Post_Deployment\Script.Post-Deployment.ps1"  -ModelNameList "m2","m1"
  </code></pre>
  
  <blockquote>
    <p>Result : Number of Models is: 1</p>
  </blockquote>
  
  <p>Running the same script in SharePoint2010 Management Shell return the correct result.</p>
  
  <blockquote>
    <p>Result : Number of Models is: 2</p>
  </blockquote>