In a nutshell what I need to do is join objects with matching property values into one object. This might be something simple but I cannot seem to find the answer.
A bit more detail:
I have an array of objects which are populated via AD, I then need to read eventviewer and populate data about these objects. Currently I have to do a foreach through the adobjects which creates a new wmi query for each object, scans eventviewer and grabs the data it wants. Doesn't sound like good programming to me (over 100 objects in the ad array). What I was thinking I need to do is read eventviewer once putting the results into an array of objects then match a field from the eventviewer with the field from AD. The only way I know how to do this is a nested foreach loop which also sounds like fairly bad programming.
Any thoughts? thanks in advance.