
Explanation/Reference:
* The New-SPClaimsPrincipal cmdlet creates a claims principal.
* Parameter -IdentityType specifies the type of the new claims principal.
We use WindowsSamAccountName to specify the user name.
Note: The type must be one of the following: WindowsSamAccountName, WindowsSecurityGroupSid, FormsUser, FormsRole, or EncodedClaim.
Example: Assigning an Administrator to the User Profile Service
$userServiceApp = Get-SPServiceApplication | where {$_.DisplayName -eq "User Profile Service Application"}
$security = Get-SPServiceApplicationSecurity $userServiceAp
p -Admin
$principalUser = New-SPClaimsPrincipal -Identity "sp2010\mangler" -IdentityType WindowsSamAccountName Grant-SPObjectSecurity $security -Principal $principalUser -Rights "Full Control" Set-SPServiceApplicationSecurity -Identity $serviceApp.Id -ObjectSecurity $security -Admin Incorrect answers:
* The New-SPUser command does not have an -IdentityType parameter.
Reference: Useful PowerShell Cmdlets for Configuring SharePoint Server 2010 - Cheat Sheet Part 2
https://angler.wordpress.com/2011/03/22/useful-powershell-cmdlets-for-configuring-sharepoint-server-
2010-cheat-sheet-part-2/