码迷,mamicode.com
首页 > 系统相关 > 详细

PowerShell创建SharePoint 权限等级

时间:2020-03-28 16:15:28      阅读:93      评论:0      收藏:0      [点我收藏+]

标签:reac   web   das   权限   each   参考   led   tor   info   

参考:https://social.technet.microsoft.com/wiki/contents/articles/18661.sharepoint-2010-update-a-permission-level-using-powershell.aspx

$sites = get-spsite -Limit ALL –webapplication http://mywebapplication.com            
ForEach ($site in $Sites)            
{             
    # The URL to the Site Collection            
    $spWeb = $site.RootWeb            
             
    # Enter the Name of the Permission Level to Change            
    $PermissionLevel=$spWeb.RoleDefinitions["CustomOwner"]            
             
    # Enter all the permissions that Permission Level should have enabled            
    $PermissionLevel.BasePermissions="ViewListItems, AddListItems, EditListItems, DeleteListItems, ApproveItems, OpenItems, ViewVersions, DeleteVersions, CancelCheckout, ManagePersonalViews, ManageLists, ViewFormPages, Open, ViewPages, AddAndCustomizePages, ViewUsageData, CreateSSCSite, ManagePermissions, BrowseDirectories, BrowseUserInfo, AddDelPrivateWebParts, UpdatePersonalWebParts, UseClientIntegration, UseRemoteAPIs, ManageAlerts, CreateAlerts, EditMyUserInfo, CreateGroups, EnumeratePermissions"            
             
    $PermissionLevel.Update()            
    $spweb.Dispose()            
    $spsite.Dispose()            
}

 

PowerShell创建SharePoint 权限等级

标签:reac   web   das   权限   each   参考   led   tor   info   

原文地址:https://www.cnblogs.com/jpinsz/p/12587801.html

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