How to create multiple Users using PowerShell

Raviteja 5 Reputation points
2023-07-12T09:15:33.94+00:00

Hey Hi,

Could you help me with creating multiple Users in Azure AD using PowerShell.

I have tried multiple ways but always I'm getting at defining UserPrincipleName.

Thank you in advance

PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,878 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,747 questions
{count} vote

1 answer

Sort by: Most helpful
  1. Tech-Hyd-1989 5,811 Reputation points
    2023-07-12T09:33:08.8933333+00:00

    Hello Raviteja

    To create multiple users in Azure AD using PowerShell, you can follow these steps:

    1. Create a CSV file with the attributes Name, samAccountName and ParentOU.
    2. Copy the PowerShell script and paste it in a Notepad file.
    3. Change the NewUsers.csv file path with your own CSV file path.
    4. Change the domain name TestDomain.local into your own domain name.
    5. Run the PowerShell script.
    
    

    I hope this helps! Let me know if you have any other questions.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.