Jump to content

Recommended Posts

Posted

Hi all,

 

I have some distribution groups with around 500 members which should change every year and currently are now out of date. I have been given a CSV file with the raw data and was wondering if it is possible to import that imformation via a CSV file?

 

The other problem I have is that the email addresses of the students do not appear on the csv file. The email address is made up as follows: [email protected]. Is there a way I can append the username field with the remaining information to make up the email address?

 

The thought of having to do it all by hand is not a good one. :)

 

Many thanks

 

Paul

Posted

email addresses is easy in Excel

=CONCATENATE(A1,"@domain.ac.uk")

where A1 is the cell reference for the username. Drag that down, simple. Then copy the contents of the sheet, open a new spreadsheet, Paste Values and save that as the CSV.

 

when you say importing, I assume you mean into active directory? If so, Powershell is your friend - modify this script to read in the CSV and add each user to the named group. You shouldn't need the email for that though, just the samAccountName.

Posted

Hi Thank you for this.

 

What I meant by importing was I want to import the content of the CSV file into a distribution list within Exchange.

 

Paul

Posted (edited)

Is your exchange not linked to your AD groups?

 

If not, this script looks like it will do the job in Exchange 2007/2010 in the EMS. No idea if it's 2003 you're running though, sorry.

 

import-csv C:\Distro1.csv | foreach {add-distributiongroupmember -id Distro1 -member $_.PrimarySmtpAddress }

Change the file path after import-csv and change Distro1 to the relevant group, obv.

Edited by sonofsanta
added code directly to fix spacing from the original page

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...