Set Microsoft 365 User Language for All Users with PowerShell
Question details
Set a preferred language for all Microsoft 365 users with PowerShell.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- An administrator wants to apply a language code across user accounts in a Microsoft 365 tenant.
- Observed behavior
- The desired language is stored as the preferred language on each selected user account; individual applications may use separate display language settings.
Choose a supported language tag, such as en-US, and sign in with an account authorized to update users and grant the required Microsoft Graph permissions. Preview the affected accounts and test the change on a small group before applying it tenant-wide.
Set User Preferred Languages with Microsoft Graph PowerShell
Use the current Microsoft Graph PowerShell module to preview users and update their preferred language.
The older MSOnline module and its Get-MsolUser and Set-MsolUser commands are retired. Microsoft Graph PowerShell is the replacement.
This updates the Microsoft Entra user profile's preferredLanguage property. It does not guarantee that every Microsoft 365 app or installed Office application will change its display language.
Open PowerShell and run: Install-Module Microsoft.Graph.Users -Scope CurrentUser. Accept the installation prompts if necessary.
Run Connect-MgGraph -Scopes "User.ReadWrite.All" and sign in with an appropriately authorized administrator account. To select a specific tenant, add -TenantId followed by its tenant ID. Admin consent may be required.
Run Get-MgUser -All -Property Id,UserPrincipalName,PreferredLanguage | Select-Object UserPrincipalName,PreferredLanguage to review the accounts and their current language values.
Run Update-MgUser -UserId "user@example.com" -PreferredLanguage "en-US", replacing the address and language tag with the values for your test account.
After testing, run: Get-MgUser -All -Property Id | ForEach-Object { Update-MgUser -UserId $_.Id -PreferredLanguage "en-US" }. Replace en-US with the supported language tag you need.
Run Get-MgUser -All -Property UserPrincipalName,PreferredLanguage | Select-Object UserPrincipalName,PreferredLanguage and check the output and any errors for accounts that were not updated.

Work with Office Documents in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface and support for common Microsoft Office formats, making it easy to move existing documents. It does not manage Microsoft 365 tenant language settings.

Frequently Asked Questions
Can I still use Set-MsolUser to change the language?
The MSOnline module is retired. Use Update-MgUser with the -PreferredLanguage parameter in Microsoft Graph PowerShell instead.
How do I target a specific Microsoft 365 tenant?
Add -TenantId and the tenant ID to Connect-MgGraph, for example: Connect-MgGraph -TenantId "tenant-id" -Scopes "User.ReadWrite.All".
Does changing preferredLanguage change every Office app's display language?
No. The command changes the user profile's preferredLanguage property. Some Microsoft 365 services and installed Office apps use separate language settings that may need to be changed in the application.
How can I check which accounts will be updated?
Run Get-MgUser -All -Property UserPrincipalName,PreferredLanguage | Select-Object UserPrincipalName,PreferredLanguage before applying the update. The bulk command updates the users returned by its Get-MgUser query.
What language code should I use?
Use a supported language tag such as en-US for U.S. English. Replace en-US in the Update-MgUser command with the appropriate supported tag for your users.




