Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

script to update the mail attribute of some users in ADS

Posted on 2014-03-07
3
Medium Priority
?
318 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
[X]
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
3 Comments
 
LVL 4

Accepted Solution

by:
Jason Ryberg earned 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

A procedure for exporting installed hotfix details of remote computers using powershell
In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
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…
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…

715 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