Office 365 – Bulk user Import

In this post I will go over how to bulk import users into EXO using powershell and whilst keeping their existing password.

Anyone who has used the Office 365 admin portal will know how limited it is and when it comes to adding users doesn’t give you much leadway in bulk imports. One of the easiest ways to bulk import into EXO is through powershell using a CSV.

Copy and paste the CSV template below into a notepad file and save it as whatever you like making sure to change the file extension to .csv in my case I’ll be saving it as users.csv .

DisplayName,UserPrincipalName,Password,FirstName,LastName
Jake Stephens,jake.stephens@cambridgeshirescouts.org.uk,P455w0rd,Jake,Stephens
Sue Smith,sue.smith@cambridgeshirescouts.org.uk,Passw0rd,Sue,Smith
Jimmy Large,jimmy.large@cambridgeshirescouts.org.uk,L0ngL1nks,Jimmy,Large

You could also create it in excel again saving it as a .csv

 

 

 

Connect to EXO, if you are unsure how to do this then check out my previous post here.

I have created a script that imports the users checkes whether the UPN exists, licenses the users and sets the password to whatever is in the CSV. Feel free to download the script at the bottom of the post. One note for the script would be to change where your CSV is stored under the Import-Csv -Path ‘C:\Path\to\csv’ and also the ‘LicenceAssignment’.

Once the script has run do a random spot check to see whether it created. From Powershell call:

Get-Mailbox -Identity “Jake Stephens”

All being well it should return a mailbox for that user.

Download “Office 365 – Start Onboarding.ps1” Start-Onboarding.ps1 – Downloaded 149 times – 1 KB

Be the first to comment on "Office 365 – Bulk user Import"

Leave a comment

Your email address will not be published.


*