script to import csv into distribution list in exchange console
script to import csv into distribution list in exchange console
(OP)
Hello,
I'm trying to setup this script to import a csv into a distribution list in exchange console:
Import-CSV FileName.csv | ForEach {Add-DistributionGroupMember -Identity "DG Name" -Member $_.Name}
But when I run the script in the exchange console shell. I receive the following:
Cannot find object "ALEXCLARK" Please make sure that it was spelled correctly or specify a different object.
I've attached my .csv, if someone could tell me why this won't add this address to a new distribution group
My CSV just has the 1st row
Name PrimarySMTPAddress
ALEXCLARK his email address
I'm trying to setup this script to import a csv into a distribution list in exchange console:
Import-CSV FileName.csv | ForEach {Add-DistributionGroupMember -Identity "DG Name" -Member $_.Name}
But when I run the script in the exchange console shell. I receive the following:
Cannot find object "ALEXCLARK" Please make sure that it was spelled correctly or specify a different object.
I've attached my .csv, if someone could tell me why this won't add this address to a new distribution group
My CSV just has the 1st row
Name PrimarySMTPAddress
ALEXCLARK his email address
RE: script to import csv into distribution list in exchange console
CODE
I hope that helps.
Regards,
Mark
Check out my scripting solutions at http://www.thespidersparlor.com/vbscript
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.