locked
Add Multiple users in AD using CSV file RRS feed

  • Question

  • Hi Team,

    I've around 500 employees, we are moving to domain environment, here problem comes, we need to add all of them as a domain user, please suggest script for the same!

    Thanks in advance!

    NTRao

    Thursday, November 3, 2016 2:14 AM

Answers

  • Hi Guys,

    finally find solution for my question from some site!, here is the answer!!

    Import-Csv C:\new-users.csv | New-ADUser -PassThru | `
    Set-ADAccountPassword -Reset `
    -NewPassword (ConvertTo-SecureString -AsPlainText 'Pa$$w0rd' -Force) `
    -PassThru | Enable-ADAccount


    this works for me !!

    Thanks for your support!!
    • Edited by NTRao Thursday, November 3, 2016 4:32 PM
    • Marked as answer by NTRao Tuesday, November 22, 2016 5:52 AM
    Thursday, November 3, 2016 10:44 AM

All replies

  • Scripts are here: https://gallery.technet.microsoft.com/

    See this


    \_(ツ)_/

    Thursday, November 3, 2016 2:32 AM
  • Hi Guys,

    finally find solution for my question from some site!, here is the answer!!

    Import-Csv C:\new-users.csv | New-ADUser -PassThru | `
    Set-ADAccountPassword -Reset `
    -NewPassword (ConvertTo-SecureString -AsPlainText 'Pa$$w0rd' -Force) `
    -PassThru | Enable-ADAccount


    this works for me !!

    Thanks for your support!!
    • Edited by NTRao Thursday, November 3, 2016 4:32 PM
    • Marked as answer by NTRao Tuesday, November 22, 2016 5:52 AM
    Thursday, November 3, 2016 10:44 AM