Quantcast
Channel: Windows PowerShell Forum
Viewing all articles
Browse latest Browse all 2562

Specify a parameter of type 'System.Int32[]'

$
0
0

Hiya,

Working a cmdlet that takes an array of integers. Here's my code:

[int[]]$codes = (1,2,3,4)
Get-LookupCodes -Codes $code

But I am getting an error:

Get-LookupCodes : Missing an argument for parameter 'Codes'. Specify a parameter of type 'System.Int32[]' and try again.

So how do I pass in an array of integers?

thnx!


Viewing all articles
Browse latest Browse all 2562

Trending Articles



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