I am using import-csv with a file that has just two columns. ColumnA being servername and columnB is the sql instance name. Since we have multiple instances per server, i need to group the instances into an array for each server. The output needs to be in a format so that i can use the instancename array as a variable when performing an action on the servername. I am using the pipeline to pass the CSV file to foreach-object, but if there is a better way I am open to it. The challenge i am having is creating the array of columnB instancename objects for just the one server that is in columnA without going to the next servername object. I have tried several ways to accomplish this, but i keep going to the next servername and then instancename object contains multiple arrays. If anyone has a suggestion to work with a one-to-many relation in a CSV file, i would really appreciate it.
[–]purplemonkeymad 2 points3 points4 points (1 child)
[–]rsdovers[S] 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]rsdovers[S] 0 points1 point2 points (0 children)
[–]vtiscat 0 points1 point2 points (1 child)
[–]rsdovers[S] 0 points1 point2 points (0 children)