I’m trying to work with arrays for the first time in Powershell (v3) so my vocabulary and upstanding needs a bit of assistance.
I would like to know what code would allow me to say: if my ‘subnet’ value is “1921683”, what is my ‘laptop’ value? (I would of course expect the answer LT3)
I’m just importing the array (I think this is an array), via a csv file.
subnet,ou,laptop,desktop
1921681,MyOU1,LT1,DT1
1921682,MyOU2,LT2,DT2
1921683,MyOU3,LT3,DT3
1921684,MyOU4,LT4,DT4
1921685,MyOU5,LT5,DT5
1921686,MyOU6,LT6,DT6
Thanks in advance
use convertfrom-csv to transform your csv to object then user select cmdlet :