Solved

script to update the mail attribute of some users in ADS

Posted on 2014-03-07
3
306 Views
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
0
Comment
Question by:barnyhall
  • 2
3 Comments
 
LVL 4

Accepted Solution

by:
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

0
 

Author Comment

by:barnyhall
ID: 39913667
have you got a sample CVS for that script please?
0
 
LVL 4

Expert Comment

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

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Set OWA language and time zone in Exchange for individuals, all users or per database.
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
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). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

856 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