I have a script to pull data from a CSV file with about 1000 lines. One of the fields is for the owner/s of a group. I found that I need to surround each user from a field/variable in quotes then comma separate them, but i'm not sure how to go about this within my script
This is what the current variable will look like when pulled from the CSV.variable = user1@domain.com,user2@domain.com,user3@domain.com
(it's a first.last for each user)
What i need it to look like is
variable = "user1@domain.com","user2@domain.com","user3@domain.com"
I'm not sure what the best route would be to get all the users surrounded with quotes. I can use -split to separate them by line but then need to rejoin them with the quotes.
The command is for set-distributiongroup
Thanks