Microsoft Office 365Powershell
Effortless User Account Creation in Office 365 with PowerShell: Single & Bulk User Setup Guide
Table of Contents
Table of Contents
If you manage user accounts in Office 365, PowerShell can be your best friend. This guide will walk you through creating both single and multiple user accounts in Office 365 using PowerShell. By the end, you’ll be a pro at efficiently handling user management in your Office 365 environment.
IT administrators with some PowerShell experience
Run these commands in your PowerShell window:
$UserCredential = Get-Credential
Connect-MsolService -Credential $UserCredential
You’ll be prompted to enter your Office 365 admin credentials.
Use this PowerShell script, replacing the placeholders with the new user’s details:
New-MsolUser -UserPrincipalName user@domain.com -DisplayName "User Name" -FirstName "First" -LastName "Last" -Password "Password" -LicenseAssignment "Enter-License-SKU"
Run this PowerShell script (make sure to replace the CSV path):
$UserList = Import-Csv C:\Path\to\CSV\File.csv
foreach ($User in $UserList) {
New-MsolUser -UserPrincipalName $User.UserPrincipalName -DisplayName $User.DisplayName -FirstName $User.FirstName -LastName $User.LastName -Password $User.Password -LicenseAssignment $User.LicenseAssignment
}
Effortlessly create user accounts in Office 365 using PowerShell, whether setting up a single user or multiple users from a CSV file. This guide empowers you to efficiently manage user accounts within your Office 365 environment. For further insights on managing user licenses, refer to our article “Bulk Assign Office 365 User Licenses with PowerShell: Step-by-Step Guide.