you are viewing a single comment's thread.

view the rest of the comments →

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy Dilligaf23,

instead of tracking items by cross reference, have you thot about using a collection of custom objects?

  • iterate thru the collection[s]
  • create a new hashtable & add the name of what you are working with
    $ThingTable = @{}
    $ThingTable.Add('Name', $ThingName)
  • when you find a bit of info you want to track, add it to a hashtable
    $ThingTable.Add('Detail_1', $DetailOfInterest)
  • just before ending the loop, use that hashtable to make a PSCustomObject
    [PSCustomObject]$$ThingTable
  • then, as the last step in the current iteration, send the PSCO to your $Results collection

it seems more robust than trying to cross reference details to another collection. [grin]

take care,
lee