Powershell: Compare 2 columns with non-unique data

Dane Briggs 281 Reputation points
2022-05-05T16:15:00.893+00:00

I have been tasked to write a script to import a CSV and determine if each user logs into a laptop, desktop or both. Some users log into multiple computers. I have a CSV of users and computers that they log into. How do I search through a column of the CSV that has duplicates and pull the data from another column and change the output? I feel like I am missing something simple

Example CSV
199331-image.png

Example of request output
199315-image.png

Windows for business | Windows Server | User experience | PowerShell
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.