From this I can see I can do this with range operator:
$myArray = @(4..9)
But how can I do something like this:
$myArray = @(usr4..9)
I have tried various deviations of this with nonsense errors:
$myArray = 4..9 |
%\{ "usr$_"\}
From this I can see I can do this with range operator:
$myArray = @(4..9)
But how can I do something like this:
$myArray = @(usr4..9)
I have tried various deviations of this with nonsense errors:
$myArray = 4..9 |
%\{ "usr$_"\}
Would that do?
@(4..9) | % {"usr" + $_}
@() is not required. 4..9 | % { "usr$_" } will suffice.