Quantcast
Channel: Recent Edits
Viewing all articles
Browse latest Browse all 12198

The -file option breaks array parameters.

$
0
0
The explanation of the -file option utterly ignores the fact that it breaks the standard script-parameter interpretation of an array parameter. That is, if you use:param([string[]]$myparam) in your script, and invoke it with:powershell -command myscript -myparam foo,bar then the script receives an array of two parameter values, while if you use:powershell -file myscript -myparam foo,bar then the script receives just a single parameter value (the string "foo,bar", not split into separate

Viewing all articles
Browse latest Browse all 12198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>