I used the below script to export a csv with computer names and object id’s from azure
There are a number of duplicate files that I would like to remove.
My csv looks like so
name, object id
comp1. id1
comp1, id1
comp2. id2
comp3, id3
I would like to remove these duplicates. I want to remove both the instances so when I output the csv we would only see comp2 and comp3. I have seen plenty scripts to remove just the duplicate but I want to remove any and all instances of duplicates.
Could someone assist with the coding for this I am fairly new and can’t find info online.
Olaf has provided an excellent example of how to filter out duplicates based on the Name, and groups them by the name (comp1, comp2, etc.) regardless of what the object id is. So if duplicates in the object id don’t matter, go this nice, clean route.
If you need to find duplicates based on the Name and object id, something like my original post would work.
Depending on your need, either solution should suffice.
If you really like to remove the duplicates of both properties you can simply append another treatment after the first one for the second property … like this: