cls
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
foreach ($webApplication in Get-SPWebApplication) {
Write-Host
Write-Host "Processing $webApplication"
Write-Host "******************************"
$webApplication.DefaultTimeZone = 45 #only set the default time zone, cannot change the time zone
foreach ($site in $webApplication.Sites) {
$webs = $site.AllWebs
Write-Host
Write-Host "Processing $site"
Write-Host "******************************"
foreach ($web in $webs) {
$culture=[System.Globalization.CultureInfo]::CreateSpecificCulture("zh-cn")
$web.Locale=$culture
#write-host $web.RegionalSettings.TimeZone #= 45
$web.Update()
$web.Dispose()
Write-Host $web.Url
}
}
$webApplication.Update()
}