Skip to content

Instantly share code, notes, and snippets.

@sdurandeu
Created January 21, 2015 23:15
Show Gist options
  • Save sdurandeu/ed088d3f153b4e49e528 to your computer and use it in GitHub Desktop.
Save sdurandeu/ed088d3f153b4e49e528 to your computer and use it in GitHub Desktop.
Powershell.exe Passing Array parameter
.\scriptParam.ps1
-----------------
Param (
[array] $myArray
)
foreach($foo in $myArray)
{
Write-Host "Value $foo"
}
.\callingScript.ps1
--------------------
powershell.exe "& .\scriptParams.ps1 -myArray seba1,seba2"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment