Tag error handling

Updating a distribution list with error handling

This morning I woke up to a query whether we could do a bulk addition of users (with email addresses) to a distribution list. The team got a list of users to add and the name of the distribution group as part of the request. The administrators would then copy-paste the email column to a new CSV file, place the file on the desktop and run a one-liner. Import-Csv "C:\Users\USER88398\Desktop\book1.csv" | ForEach-Object { Add-DistributionGroupMember "DL-DistributionGroup070818" -Member $_.