首页 > 系统服务 > 详细

PowerShell创建SharePoint 权限等级

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

参考: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 权限等级

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!