If I understand you correctly, you want to check a specific user's AD rights over a specific group. Here's an example that will return all the individual rights assigned to a certain group.
Get-ADGroup "GroupToCheck" | Foreach-Object {
foreach($dacl in Get-Acl AD:$($_.distinguishedname))
{
foreach($ace in $dacl.Access)
{
[PSCustomObject]@{
"Group Name" = $_.name
"Group Owner" = $dacl.owner
ActiveDirectoryRights = $ace.ActiveDirectoryRights
AccessControlType = $ace.AccessControlType
IdentityReference = $ace.IdentityReference
}
}
}
} -OutVariable AllRights
You could check if the user or a group the user is in has rights, group/filter the results by identity, etc.