PowerShell: Set Location

Office 365 requires all users to have a Location before we can assign a license.

Feel free to leverage Export and Import CSV.

Commandlet: Set-MsolUser -UsageLocation

For a specific user the command will be:

Command: Set-MsolUser -UserPrincipalName youruser@yourdomain.com -UsageLocation NO

With Imported CSV:

Command: Import-CSV -Path C:CSVfile.csv | ForEach-Object | Set-MsolUser -UsageLocation NO

One response to “PowerShell: Set Location”

  1. […] Prereqs: User must have defined a Location/Country. […]

Leave a Reply


I am Roy Apalnes, a Microsoft Cloud Evangelist working av Sopra Steria. Main focus in Microsoft Security and Endpoint Management, with a bigger picture in mind.

Featured Posts