Compartilhar via


SharePoint Regional Settings in Powershell

# my friend Purdon is a SharePoint God of note
# and he reminded me of a problem that crops up occasionally
# when dealing with TZ's and Languages
# here is his Powershell to correct a Language for a Site
#
param ([string] $SiteCol = $(throw “The Site Collection URL is required.”))
 #throw exception if no value provided
  [System.Reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”)
  $spsite=[Microsoft.SharePoint.SPSite]($SiteCol)
  $rootWebSite=$spsite.RootWeb
  $website=$spsite.OpenWeb($rootWebSite.ID)
  $culture=[System.Globalization.CultureInfo]::CreateSpecificCulture(“en-AU”)
  $website.Locale=$culture
  $website.Update()
  $website.Dispose()
  $rootWebSite.Dispose()
  $spsite.Dispose()
  Write-Host “Finished Updating the locale of $SiteCol to English (Australia)”

Comments

  • Anonymous
    March 29, 2015
    thanks