How to automate task of creating universal distribution groups and importing a list of users into the group
Has anyone had any success with automating the task of creating universal distribution groups and importing a list of users in excel format into the new group?
April 30th, 2010 7:12am
Has anyone had any success with automating the task of creating universal distribution groups and importing a list of users in excel format into the new group?
Reply
Quote
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2010 8:08am
I have.
--
Ed Crowley MVP
"There are seldom good technological solutions to behavioral problems."
.
"leporej092170" wrote in message
news:24e78a13-6e6a-4b3c-88d2-48e17fb9534e...
Has anyone had any success with automating the task of creating universal distribution groups and importing a list of users in excel format into the new group? Ed Crowley MVP "There are seldom good technological solutions to behavioral problems."
April 30th, 2010 8:19pm
Hi,
I’m not clear about your meaning of automatic task… You could use the following method to add users in bulk.
First, you could export the value of users into a txt file, and then import the file with Import-Csv cmdlet
Export the value
Csvde -r objectclass=user -l "Name" -f C:\addmember.txt
Import the file via Exchange Management Shell (EMS)
Import-csv C:\addmember.txt | foreach {add-distributiongroupmember DGName -member $_.Name}
Resources:
How to use Csvde to import contacts and user objects into Active Directory
http://support.microsoft.com/kb/327620
Using the Import-Csv Cmdlet
http://technet.microsoft.com/en-us/library/ee176874.aspx
If you would like to run a scheduled task for Exchange, you can refer to the following article:
How To: Schedule PowerShell Script for an Exchange Task
http://exchangeshare.wordpress.com/2008/12/08/how-to-schedule-powershell-script-for-an-exchange-task/
Hope this helps. Thanks,
Elvis
Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2010 9:18am