Install-Module MSOline
Connect-MsolService
Get-MsolAccountSku
Country code: https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
Download users.csv template.
Import-Csv -Path "~\Desktop\users.csv" | foreach {New-MsolUser -DisplayName $_.DisplayName -FirstName $_.FirstName -LastName $_.LastName -UserPrincipalName $_.UserPrincipalName -UsageLocation $_.UsageLocation -LicenseAssignment $_.LicenseAssignment -Password $_.Password} | Export-Csv -Path "~\Desktop\log.csv"
5/5 - (1 vote)