Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Powershell - Arrays or HashTables?

$
0
0

Hi

I'm stuck as I need to write a program to loop through an array of ip addresses. This is as far as I have got to store a list :-

$list = @{customer="1";ip="10.1.1.1}
$list += @{customer="2";ip="10.1.1.2"}

Once I've go this far, I will run some tests against each IP address, like making sure the customers have the correct file versions which they should have. Its just setting up the array that Hash Table/Array that I'm stuck with.

I've read about hash-tables - should I use Hash Tables or should I learn how to use mutli-arrays to store the customer number and ip address.

Any advice please.

Kind Regards

Matthew


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>