Skip to content

Instantly share code, notes, and snippets.

@pkbullock
Created November 5, 2020 22:10
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/2106323c38bb80edd804e3345a8155a8 to your computer and use it in GitHub Desktop.
Save pkbullock/2106323c38bb80edd804e3345a8155a8 to your computer and use it in GitHub Desktop.
Apply UK Locale using PnP PowerShell (Classic)
Connect-PnPOnline https://tenant.sharepoint.com/sites/yoursite
$LocaleId = 2057 # UK
$TimeZoneId = 2 # London
$web = Get-PnPWeb -Includes RegionalSettings,RegionalSettings.TimeZones
$timeZone = $web.RegionalSettings.TimeZones | Where-Object {$_.Id -eq $TimeZoneId}
$web.RegionalSettings.LocaleId = $LocaleId
$web.RegionalSettings.TimeZone = $timeZone
$web.Update()
Invoke-PnPQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment