1..5 |%{"test" |select @{n="name";e={$_}}}
How to get 1 to 5 to $_ (current value in pipeline) instead of "test" ?
I was bored, playing around.. and wanted to list all items from array based on this example
0..5 |%{get-aduser username |select @{n="oupath";e={($_.distinguishedname -split ",*..=")[$_]}}}