You can Export information to a CSV File, so lets see how the Import from a CSV File works in PowerShell for Office 365.
Commandlet: Import-CSV -Path C:YourCSVfile.csv
If you read my article about Export-CSV we have a CSV with all our UserPrincipalNames or you can specify what to Select inside a CSV-file:
Command: Import-CSV -Path C:YourCSVfile.csv | Select UserPrincipalName
Combine that with a command against a user and it can be like this:
Command: Import-CSV -Path C:YourCSVfile.csv | Select UserPrincipalName | ForEach-Object | Set-MsolUser -UsageLocation NO
This will set UsageLocation to Norway for all users inside the CSV File.
Leave a Reply
You must be logged in to post a comment.