locked
How to add email address to the Active Directory User account RRS feed

  • Question

  • Hello,

    In my current Active Directory, there are all the users who are created without the email address. They are actively connecting to resources and now with the new requirement, I had to email address to all the users. Could anyone provide me a script on how to update email address without affecting any other settings?


    Shekar-Technet

    Wednesday, November 21, 2018 7:16 PM

Answers

All replies

  • This should get you started.

      
            $SAM=Read-Host "Enter users Logon"
      
      
            Try{
    
               Set-ADuser $SAM -EmailAddress "EmailedAddressGoesHere" -ErrorAction Stop             
               
    
            }Catch{
    
               Write-host Processing Halted Not All Account Revised  $_.Exception.Message
    
            }

    • Proposed as answer by ComputerScott Wednesday, November 21, 2018 7:28 PM
    • Unproposed as answer by Shekar7976 Friday, November 23, 2018 10:45 PM
    Wednesday, November 21, 2018 7:27 PM
  • Thank you,

    Sorry, I forgot to mention that I have a CSV file created for all 400 users with the userid and email address. 


    Shekar-Technet

    Wednesday, November 21, 2018 7:36 PM
  • Please read this first.

    This forum is for scripting questions rather than script requests


    -- Bill Stewart [Bill_Stewart]

    • Marked as answer by Shekar7976 Friday, November 23, 2018 10:44 PM
    Wednesday, November 21, 2018 7:44 PM
  • Thank you very much. I appreciate you Bill

    Shekar-Technet

    Friday, November 23, 2018 10:44 PM