Setting preferred-language on ADDS/AAD account

If you need to set the preferred language on an account to stop the issue with the date being USA when in the UK which can cause issues with PowerApps and PowerBI and Teams then you need to update an attribute, to complete this you will need the correct command for the type of account.

If the command is a cloud only account then you can use this:

Get-MsolUser -UserPrincipalName <UPN> | Set-MsolUser -PreferredLanguage "en-GB"
If you wish to target all cloud accounts then you can use this:
Get-MsolUser -ResultSize Unlimited | Set-MsolUser -PreferredLanguage "en-GB"
However if you get this error:

Set-MsolUser : Unable to update parameter. Parameter name: PREFERREDLANGUAGE.

At line:1 char:66

    + CategoryInfo          : OperationStopped: (:) [Set-MsolUser], MicrosoftOnlineException

    + FullyQualifiedErrorId : Microsoft.Online.Administration.Automation.PropertyNotSettableException,Microsoft.Online.Administration.Automation.SetUser

This means the user is synced with a local domain and to accomplish this you need to run this, locally from your local domain PowerShell, which will in turn sync to AAD.......
Get-AdUser <UPN.> | Set-ADUser -Replace @{‘preferredLanguage’=”en-gb”}
To do this whole domain you can run this:
Get-AdUser -Filter * -ResultSetSize Unlimited | Set-ADUser -Replace @{‘preferredLanguage’=”en-gb”}

Previous Post Next Post

نموذج الاتصال