Using PowerShell to add users

Adding users with PowerShell is a fairly straightforward process that uses the New-MsolUser command. However, there are a lot of parameters to keep track of.

Here are the basics that you'll likely use every time you create a new account:

  • -DisplayName: Display name; might appear differently than first and last name.
  • -FirstName: User's given name.
  • -LastName: User's family name/surname.
  • -UserPrincipalName: The user's login name such as user@tenantname.onmicrosoft.com.
  • -UsageLocation: Two-digit country code, such as US or UK—important because it is required for certain services such as Exchange Online and Skype for Business.
  • -LicenseAssignment: An array of valid SKU part numbers (license codes) that will be assigned ...

Get Mastering Office 365 Administration now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.