码迷,mamicode.com
首页 > 其他好文 > 详细

批量修改SharePoint2013 备用语言

时间:2014-07-07 12:54:49      阅读:276      评论:0      收藏:0      [点我收藏+]

标签:os   art   cti   for   io   new   

cls
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
foreach ($webApplication in Get-SPWebApplication) {
    Write-Host
    Write-Host "Processing $webApplication"
    Write-Host "******************************"
    
    foreach ($site in $webApplication.Sites) {
       
        $webs = $site.AllWebs
        Write-Host
        Write-Host "Processing $site"
        Write-Host "******************************"
        foreach ($web in $webs) {
                $Web.IsMultilingual = $true
 
                        $WebRegionSettings = New-Object Microsoft.SharePoint.SPRegionalSettings($Web)
                        Foreach ($lang in $WebRegionSettings.InstalledLanguages)
                        {
                            If ($Web.SupportedUICultures -notcontains $lang.LCID)
                            {
                                $Web.AddSupportedUICulture($lang.LCID)
                            }                    
                        }                       
          
            $web.Update()
            $web.Dispose()
            Write-Host $web.Url
        }
    }   
}

批量修改SharePoint2013 备用语言,布布扣,bubuko.com

批量修改SharePoint2013 备用语言

标签:os   art   cti   for   io   new   

原文地址:http://www.cnblogs.com/fengwenit/p/3820036.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!