I have a simple for loop and I am getting a wierd error in PS v2 in
Windows 7 I am sure I am not doing something right, but I am
stumped...
for ($a = 1, $a -le 5, $a++) { write-host $a}
Gives me:
Bad argument to operator '-le': Could not compare "1" to "System.Object
[]". Error: "Cannot convert the "System.Object[]
" value of type "System.Object[]" to type "System.Int32".".
At C:\scripts\Test-network.ps1:2 char:20
+ for ($a = 1, $a -le <<<< 5, $a++)
+ CategoryInfo : InvalidOperation: ([],
RuntimeException
+ FullyQualifiedErrorId : BadOperatorArgument

[],
