zoukankan      html  css  js  c++  java
  • 启用SharePoint 2013文档版本控制

    cls
    $PSSnapin = Add-PsSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue | Out-Null
    $webAppUrl = Read-Host
    $WebApp = Get-SPWebApplication $webAppUrl
    Foreach ($SiteColl in $WebApp.Sites)
    {
        $rootSite = Get-SPSite $SiteColl.Url
        $allWebs = $rootSite.AllWebs
        foreach ($web in $allWebs)
        {
            $lists = $web.lists
            foreach ($list in $lists)
            {
    #            $list.EnableVersioning = $false
    #             $list.update()
                if($list.EnableMinorVersions -eq $false)
                {               
                    # write-host $list.title "is a not using versions"
                     if($list.BaseType -eq "DocumentLibrary")
                     {
                         write-host $list.title "is a not using versions"
                         $list.EnableMinorVersions = $true
                         $list.update()
                     }
                }
                else
                {
                     $list.EnableMinorVersions = $false
                         $list.update()
                     #Write-host $list.title " is set for up to " $list.MajorVersionLimit "previous versions"
                }
            }
        }
    }

  • 相关阅读:
    EasyUI treegrid 加载checked
    html 文字垂直居中
    SQLSERVER 2008 查询数据字段名类型
    EasyUI TreeJson
    win7 网站发布备注
    LVS Nginx HAProxy 优缺点
    快速安装laravel和依赖
    Whoops, looks like something went wrong
    View.findViewById()和Activity.findViewById()区别
    ListView下拉刷新,上拉自动加载更多
  • 原文地址:https://www.cnblogs.com/fengwenit/p/3680460.html
Copyright © 2011-2022 走看看