Solved

script to update the mail attribute of some users in ADS

Posted on 2014-03-07
3
307 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 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Export DG's members info in Office 365. 2 25
How to fix error "424" object required. 6 48
need assistance with a VBscript 3 33
Error when Running powershell script 6 26
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
A brief introduction to what I consider to be the best editor for PowerShell.
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 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…

735 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