Home powershell looping and storing content to variable
Reply: 0

powershell looping and storing content to variable

user455
1#
user455 Published in June 19, 2018, 8:00 pm

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!

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.305299 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO