When working with SharePoint 2013, you will not need this in most cases as the default authentication provider is Claims.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$WebAppName = "http://webappurl/" | |
$wa = get-SPWebApplication $WebAppName | |
$wa.UseClaimsAuthentication = $true | |
$wa.Update() | |
$account = "domain\username" | |
$account = (New-SPClaimsPrincipal -identity $account -identitytype 1).ToEncodedString() | |
$wa = get-SPWebApplication $WebAppName | |
$zp = $wa.ZonePolicies("Default") | |
$p = $zp.Add($account,"PSPolicy") | |
$fc=$wa.PolicyRoles.GetSpecialRole("FullControl") | |
$p.PolicyRoleBindings.Add($fc) | |
$wa.Update() | |
$wa.MigrateUsers($true) | |
$wa.ProvisionGlobally() |
No comments:
Post a Comment