btny
asked on
Add contacts from a CSV file to a distribution list
Hi,
I have just imported several CSV files into mail enabled contacts in MS Exchange 2010 using this command
Import-Csv C:\Export\EarlyInterventio n.csv | ForEach { New-MailContact -Name $_.DisplayName -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit "BoardMembers" }
So now those users are contacts in my AD/MX servers.
I wish to be able to import those members into a distribution list called @BoardMembers howeveer when I run this command
Import-Csv C:\Export\BoardMembers.csv | ForEach-Object -Process { Add-DistributionGroupMembe r -@BoardMembers -Member $_ }
It doesnt work
Any advice on how to do this is appreciated!
I have just imported several CSV files into mail enabled contacts in MS Exchange 2010 using this command
Import-Csv C:\Export\EarlyInterventio
So now those users are contacts in my AD/MX servers.
I wish to be able to import those members into a distribution list called @BoardMembers howeveer when I run this command
Import-Csv C:\Export\BoardMembers.csv
It doesnt work
Any advice on how to do this is appreciated!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ken, YOU ARE MY HERO!!
http://tech-informer.com/exchange-2007-powershell-commands-and-tips-115/
Import-Csv | ForEach { New-MailContact -Name $_.Name -Alias $_.Alias -ExternalEmailAddress $_.EmailAddress -OrganizationalUnit Users }
HTH,
Kent