• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 332
  • Last Modified:

script to update the mail attribute of some users in ADS

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
barnyhall
Asked:
barnyhall
  • 2
1 Solution
 
Jason RybergTechnical Consultant IVCommented:
Import-Module ActiveDirectory

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

$Users | % {

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

}

Open in new window

0
 
barnyhallAuthor Commented:
have you got a sample CVS for that script please?
0
 
Jason RybergTechnical Consultant IVCommented:
Attached is an example CSV...
sample.csv
0

Featured Post

Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now