After I have the contents of the CSV file sorted, I use the unique switch to return only unique rows from the file:
Read full article from Use PowerShell to Remove Duplicate Lines from a CSV File - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
Import-Csv C:\fso\UsersConsolidated.csv | sort lname,fname –Unique
Read full article from Use PowerShell to Remove Duplicate Lines from a CSV File - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs
No comments:
Post a Comment