Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • 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
  • 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

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

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

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