SharePoint 特殊用户标识
To get claim for All Authenticated Users in PS you need to use:
$claim = New-SPClaimsPrincipal -EncodedClaim "c:0(.s|true"
for windows users (NT AUTHORITY\authenticated users):
$claim = New-SPClaimsPrincipal -EncodedClaim "c:0!.s|windows"
and for all forms authenticated users (basic asp.net membership provider)
$claim = New-SPClaimsPrincipal -EncodedClaim "c:0!.s|forms:aspnetsqlmembershipprovider"
NOTE: Need to use EnsureUser() or else the add method will not work.
$allAuthenticatedUsers = $web.EnsureUser(“c:0!.s|windows”);
$web.AssociatedVisitorGroup.Users.Add($allAuthenticatedUsers,””,”c:0!.s|windows”,””)
$web.update()
http://sptrac.com/wordpress/?p=88
博文推荐: |
SharePoint 2013 WebPart 管理工具分享[开源] |
基于SharePoint 2013的论坛解决方案[开源] |
SharePoint 2013 学习基础系列入门教程 |
SharePoint 2013 图文开发系列之门教程 |
SharePoint Designer 学习系列入门教程 |
特:如果有SharePoint项目,欢迎邮件联系我,Email:linyu_s@163.com |