Create One User in the Portal

PowerShell:

Connect-MsolService

The finished command will look similar to:

New-MsolUser -UserPrincipalName “powershell@spodawgs.onmicrosoft.com” -City “Mumbai” -State “MH” -Country “India” -DisplayName “PowerShell”

Additional Parameters:

New-MsolUser -DisplayName <string> -UserPrincipalName <string>

[-AlternateEmailAddresses <string[]>] [-AlternateMobilePhones <string[]>]

[-BlockCredential <Boolean>] [-City <string>] [-Country <string>] [-Department

<string>] [-Fax <string>] [-FirstName <string>] [-ForceChangePassword <Boolean>]

[-ImmutableId <string>] [-LastName <string>] [-LicenseAssignment <string[]>]

[-LicenseOptions <LicenseOption[]>] [-MobilePhone <string>] [-Office <string>]

[-Password <string>] [-PasswordNeverExpires <Boolean>] [-PhoneNumber <string>]

[-PostalCode <string>] [-PreferredLanguage <string>] [-State <string>]

[-StreetAddress <string>] [-StrongPasswordRequired <Boolean>] [-TenantId <Guid>]

[-Title <string>] [-UsageLocation <string>] [<CommonParameters>]

More Information:

https://blogs.technet.microsoft.com/heyscriptingguy/2014/08/04/use-powershell-to-create-bulk-users-for-office-365/

Adding Users in Bulk

To add users in bulk > Navigate to the Office 365 Portal

PowerShell:

Connect to Office 365 using “Windows Azure Active Directory Module for Windows PowerShell” > Run as Admin

Run the following command to connect: Connect-MsolService

$users = Import-Csv C:\Users\Clint\Downloads\Import_User_Sample_en.csv

$users | ForEach-Object {New-MsolUser -UserPrincipalName $_.UserPrincipalName -FirstName $_.firstname -LastName $_.lastname -DisplayName $_.DisplayName -Title $_.title -Department $.department -City $_.city -State $_.State -Country $_.Country}

Additional Parameters:

New-MsolUser -DisplayName <string> -UserPrincipalName <string>

[-AlternateEmailAddresses <string[]>] [-AlternateMobilePhones <string[]>]

[-BlockCredential <Boolean>] [-City <string>] [-Country <string>] [-Department

<string>] [-Fax <string>] [-FirstName <string>] [-ForceChangePassword <Boolean>]

[-ImmutableId <string>] [-LastName <string>] [-LicenseAssignment <string[]>]

[-LicenseOptions <LicenseOption[]>] [-MobilePhone <string>] [-Office <string>]

[-Password <string>] [-PasswordNeverExpires <Boolean>] [-PhoneNumber <string>]

[-PostalCode <string>] [-PreferredLanguage <string>] [-State <string>]

[-StreetAddress <string>] [-StrongPasswordRequired <Boolean>] [-TenantId <Guid>]

[-Title <string>] [-UsageLocation <string>] [<CommonParameters>]