In my site, I add user with powershell to a group.
Set-SPUser -Identity $User -Web $siteCollUrl -Group $group
The user appear in the groupe but when I do a "check permission" on the SharePoint site, there is no result...
In my site, I add user with powershell to a group.
Set-SPUser -Identity $User -Web $siteCollUrl -Group $group
The user appear in the groupe but when I do a "check permission" on the SharePoint site, there is no result...
Maybe the group does not have any permission, run this to get the permission for the group:
$urlWeb = "http://yourPortalUrl"
$web = Get-SpWeb $urlWeb
foreach($roleAssignment in $web.RoleAssignments)
{
write-host -foregroundcolor green "Group Name: "$roleAssignment.Member.Name "..."
foreach($roleDefinition in $roleAssignment.RoleDefinitionBindings)
{
write-host -foregroundcolor red "Permission Name: "$roleDefinition.Name "..."
}
}
and this to get a complete permission report by user:
$urlWeb = "http://sp2010"
Get-SPUser -Web $urlWeb | select UserLogin, @{name=”Exlicit given roles”;expression={$_.Roles}}, @{name=”Roles given via groups”;expression={$_.Groups | %{$_.Roles}}},Groups | format-Table -auto