jamorlando
asked on
Import .csv file into Exchange Distribution Group
Seems like a simple enough question, but I can't figure this out, nor can I find anything on google.
I have a spreadsheet with over 500 email addresses. I would like to make this a Distribution Group in Exchange. How can I do this, without entering each e-mail manually?
Thanks,
Jamie
I have a spreadsheet with over 500 email addresses. I would like to make this a Distribution Group in Exchange. How can I do this, without entering each e-mail manually?
Thanks,
Jamie
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
yes you have to first create a blank DL.
Also In the shell command I gave "DL Name" is the name of the list, you need to change it.
Also In the shell command I gave "DL Name" is the name of the list, you need to change it.
ASKER
Nice! It works, however, it looks like the email addresses already have to exist in Active Directory. Here's an example of an error that I got while running this. Do these emails need to be in AD, and if so is there an easy way to get them in?
Thanks!
Add-DistributionGroupMembe r : Object "test123@test.com" could not be found. Please make sure that it was spelled correctly or specify a different object.
At line:1 char:73
+ Type C:\test.csv | ForEach-Object -Process { Add-DistributionGroupMembe r <<<
< testtest -Member $_ }
Thanks!
Add-DistributionGroupMembe
At line:1 char:73
+ Type C:\test.csv | ForEach-Object -Process { Add-DistributionGroupMembe
< testtest -Member $_ }
yes.. if we add a memeber in DL it has to be either a mailbox or mail enabled user. We cannot add an external email address.
ASKER
Razi, I am going to raise the points to 500 to ask a related question.
About half of these names are already contacts in Active Directory and imported properly, while the other ones aren't in there yet.
Can you provide with with a command to input a list of email addresses from a file and add them if they're not already added?
About half of these names are already contacts in Active Directory and imported properly, while the other ones aren't in there yet.
Can you provide with with a command to input a list of email addresses from a file and add them if they're not already added?
Jamorlando,
First, In a DL we can only add those user's who are visible in GAL that means accounts need to be created and replicated in Active Directory.
Second, the same command should work once the other accounts are created in the list. It will just ignore the others who were added already.
Hope I Answered the question :)
First, In a DL we can only add those user's who are visible in GAL that means accounts need to be created and replicated in Active Directory.
Second, the same command should work once the other accounts are created in the list. It will just ignore the others who were added already.
Hope I Answered the question :)
You can bulk create user's using the steps suggested here.
http://exchangepedia.com/blog/2006/11/exchange-server-2007-bulk-creation-of.html
a) Creat a CSV with 3 columns
Alias,Name,UPN
User_One,User One,userone@yourUPNsuffix. com
b) Use the cmdlet
Import-CSV CreateRecipients.csv | foreach {new-mailbox -alias $_.alias -name $_.name -userPrincipalName $_.UPN -database "Mailbox Database" -org Users -Password $Password}
After that you can run razi's steps above to import users in DL.
thanks
http://exchangepedia.com/blog/2006/11/exchange-server-2007-bulk-creation-of.html
a) Creat a CSV with 3 columns
Alias,Name,UPN
User_One,User One,userone@yourUPNsuffix.
b) Use the cmdlet
Import-CSV CreateRecipients.csv | foreach {new-mailbox -alias $_.alias -name $_.name -userPrincipalName $_.UPN -database "Mailbox Database" -org Users -Password $Password}
After that you can run razi's steps above to import users in DL.
thanks
ASKER
Thanks Sunny, I'm not interested in creating mailboxes for them.
I just need to create contacts in Active Directory.
I just need to create contacts in Active Directory.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
[PS] C:\Documents and Settings\Administrator.IKS
Add-DistributionGroupMembe
At line:1 char:77
+ Type C:\test.csv | ForEach-Object -Process { Add-DistributionGroupMembe
<<<< Name -Member $_ }
Add-DistributionGroupMembe
At line:1 char:77
+ Type C:\test.csv | ForEach-Object -Process { Add-DistributionGroupMembe
<<<< Name -Member $_ }
Do I first need to create a blank Distribution Group? Do the email addresses already need to be in Active Directory?