So I have a list of items in a String array ($colors= 'red','blue','green', etc) and I also have a variable for each item ($red='1' $blue='1' $green='0', etc)
The list of items in the array are things that MIGHT have to be modified. The info in the variable tells me if it has to be modified or not. 1=yes, 0=no
What I need to do is loop through the original list of possible items and check the variable for each one to see if it needs to be modified or not.
I was going to do a foreach ($color in $colors) but then I need to have a way of saying to get the variable who's name matches the value of $color. Almost like I'd do $$color if that makes sense.
Can I do that? is there some other way to do this? Does Powershell support 2D arrays that I can have the names in one row and the 1s and 0s in the next row or something?
Not sure if I'm explaining this well or not but hopefully that makes sense.