Is there to loop through all site collections and change the locale settings (from US to UK), without having to visit each one in turn and change it manually? i.e. using PowerShell. I would also like to include my sites in this process and any new 'my site' created to use the correct regional settings?


Locale is a property of the SPWeb so you have to do something like this

[Reflection.Assembly]::LoadWithPartialName("System.Globalization") | out-null
get-spweb -site http://yoururl -limit all |% {
    $_.Locale = [System.Globalization.CultureInfo]::GetCultureInfo(2057);
#see if things applied
get-spweb -site http://yoururl -limit all |% {

Care should be taken with the -limit argument, it could take a long time

To get site collections created with the right timezone, update the web application that they are in with the right timezone, this can be done in central admin.

To get mysites created with the right Locale, go to the mysite host's regional settings page (http://url/my/_layouts/settings.aspx) and change it there (or use powershell). New sites will get the new settings, existing sites wont.


  • Access denied when I use get-spweb (even as a farm administrator, and running the shell with admin rights). Will it work with Get-SPSite? e.g. Get-SPSite -Identity http://my.domain.com* -Limit ALL? – Sam Jan 6 '11 at 13:13
  • 2
    Farm administrators do not automatically get permissions to all site collections, they have to be added to the site collection administrators group. You can use the command Get-SPSiteAdministration to get access to some properties if you are the farm administrator, but Locale is not one of them. If you want a powershell script to add a farm administrator to all site collections, create another question of me. Ta. – djeeg Jan 6 '11 at 13:58
  • Or add a Web Application User Policy in Central Admin to grant the farm admin extra rights on the content. – Andy Burns Jan 6 '11 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.