script to update the mail attribute of some users in ADS

Posted on 2014-03-07
Last Modified: 2014-03-07
I need a script to update the mail attribute of some users in ADS

just would like two fields in the CSV account name and new email address
Question by:barnyhall
  • 2

Accepted Solution

Jason Ryberg earned 500 total points
ID: 39913662
Import-Module ActiveDirectory

$Users = Import-CSV C:\pathToFile\users.csv

$Users | % {

  Set-ADUser $_.accountName -Email $_.EmailAddress


Open in new window


Author Comment

ID: 39913667
have you got a sample CVS for that script please?

Expert Comment

by:Jason Ryberg
ID: 39913675
Attached is an example CSV...

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Windows Server Update Service (WSUS) is free for everyone, but it lacks of some desirable features like send an e-mail to the administrator with the status of all computers on the WSUS server. This article is based on my PowerShell script …
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now