Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 330
  • 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 RybergCommented:
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 RybergCommented:
Attached is an example CSV...
sample.csv
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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