Skip to content

Instantly share code, notes, and snippets.

@pkbullock
Last active May 30, 2020 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pkbullock/be514930940b30e5b5d725fe86e32a13 to your computer and use it in GitHub Desktop.
Save pkbullock/be514930940b30e5b5d725fe86e32a13 to your computer and use it in GitHub Desktop.
Change MUI Setting in SharePoint for User
Connect-PnPOnline https://<tenant>.sharepoint.com/sites/<site>
Get-PnPListItem -List "User Information List" -Id 7 # Me
# -OR- #
$userEmail = "paul.bullock@mytenant.co.uk"
$CamlQuery = @"
<View>
<Query>
<Where>
<Eq>
<FieldRef Name='EMail' />
<Value Type='Text'>$userEmail</Value>
</Eq>
</Where>
</Query>
</View>
"@
$item = Get-PnPListItem -List "User Information List" -Query $CamlQuery
# Language Reference: https://capacreative.co.uk/resources/reference-sharepoint-online-languages-ids/
$item["MUILanguages"] = "cy-GB" #"en-GB"
$item.Update()
Invoke-PnPQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment