How to Create Users in Bulk in Office 365 with PowerShell

ITPro Today

September 27, 2017

1 Min Read
Windows 10 on a Monitor

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}

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like