export user list and create users in active directory

dirkdigs 921 Reputation points
2023-01-18T18:55:41.1133333+00:00

I have 100 users in M365 tenant (cloud only , no dirsync) .

I need to create same 100 users in active directory .

i need to enable dirsync.

is there easy way to create the user in active directory?

Microsoft Exchange Online
Microsoft Exchange Online Management
Microsoft Exchange Online Management
Microsoft Exchange Online: A Microsoft email and calendaring hosted service.Management: The act or process of organizing, handling, directing or controlling something.
4,351 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,446 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,366 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Dillon Silzer 55,481 Reputation points
    2023-01-18T19:48:41.75+00:00

    Hello,

    You will either want to export the users via PowerShell or go to https://admin.microsoft.com > Users > Active Users > Export Users:

    User's image

    Then you can either run one by one through the CSV or create a PowerShell script utilizing New-ADUser iteritively through the CSV file with a for each loop.

    New-ADUser

    https://video2.skills-academy.com/en-us/powershell/module/activedirectory/new-aduser?view=windowsserver2022-ps

    Import-Csv

    https://video2.skills-academy.com/en-us/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-7.3

    Side Note: You cannot use Azure AD Connect to sync from Office 365 Cloud to on-prem (as it is only on-prem to Cloud).


    If this is helpful please accept answer.