Windows 10 on a Monitor

How to Create Users in Bulk in Office 365 with PowerShell

In one of my earlier post, I showed you to create multiple users simultaneously in Office 365 with GUI.

However in this post, we will focus on creating users in bulk in Office 365 with PowerShell.

Step-By-Step

1. Open Notepad or any other editor and add the user detail as shown in the following screenshot,

 

Where AccountSkuid is the license you want to assign newly created users.

2. Save the file with .csv extension.

3. Open PowerShell and execute the following command.

Import-Csv -Path "" | foreach {New-MsolUser -DisplayName $_.DisplayName -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -LicenseAssignment $_.AccountSkuId}

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish