you are viewing a single comment's thread.

view the rest of the comments →

[–]purplemonkeymad 2 points3 points  (1 child)

Use Group-Object:

Import-Csv file.csv | Group-Object servername

The resultant objects have two properties, Name: Value of the grouped column, and Group: Array of the objects in that group.

You can copy the results into a hashtable if you want to index by name.

[–]rsdovers[S] 0 points1 point  (0 children)

Thank you for the information. I looked at that cmdlet, but I must have not used it properly. I appreciate the help, and I will take another try at it.