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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

623 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