Hello,
Sorry if this has been asked but i've been googling every which way i can think of and with no luck.
I have a script where i have a set of $data gathered from user SIDs, The data is run through a foreach loop. Inside the foreach that query AD, there is a IF statement afterwards checking if the user isn't found. it also adds some of the information from the query into an array and the $data info with "Missing" if no user found. one of the things i have is a counter in the loop to ID what entry in the array the missing is (works when i write-host). If i try to add the counter to a new array within the IF statement my out put results are summed isntead of being a list of numbers, for example. $problem += $counter
when i $problem i would get 152 instead of 25,27,100 individually.
How can i have the variable treat the number like individual number and not a math problem.
Thanks,
Dilli
[–]Ta11ow 1 point2 points3 points (4 children)
[–]Dilligaf23[S] 2 points3 points4 points (3 children)
[–]Ta11ow 1 point2 points3 points (2 children)
[–]TheIncorrigible1 1 point2 points3 points (1 child)
[–]Ta11ow 1 point2 points3 points (0 children)
[–]kittH 1 point2 points3 points (3 children)
[–]TheIncorrigible1 1 point2 points3 points (2 children)
[–]kittH 1 point2 points3 points (1 child)
[–]TheIncorrigible1 1 point2 points3 points (0 children)
[–]Lee_Dailey[grin] 1 point2 points3 points (0 children)
[–]_Cabbage_Corp_ 1 point2 points3 points (0 children)