So I need my script to loop through an array and store the content in other variable, so I can manipulate it later.
foreach ($element in $machinesNames){
Get-BrokerMachine -MachineName $element | select LoadIndex -expand LoadIndex
}
OUTPUT:
2845
5750
5875
5944
5873
5828
5205
6302
5025
5655
6311
5626
5491
5621
How can I store above results in an array?
Thanks!