Unable to enable user in Lync Server
Get-ADUser -LDAPFilter "(objectcategory=person)(samaccountname=*)(admincount=1)"
or for a more user friendly output:
Get-ADUser -LDAPFilter "(admincount=1)" | select name
To find all groups in a domain that are protected by AdminSDHolder, type:
Get-ADGroup -LDAPFilter "(objectcategory=group)(admincount=1)"
or for a more user friendly output:
Get-ADGroup -LDAPFilter "(admincount=1)" | select name
Removing the admincount setting
If the user is not supposed to be in a Protected Group, remove the groups that are nested members of the Protected Groups.
Then change the admincount to 0 on the user account, either vi ADUC and the Attribute Editor tab, or via the script available here:
http://support2.microsoft.com/?id=817433
Last thing to do is to activate security inheritance on the user account.
The procedure is almost the same when fixing a group, though you need to use ADSIEdit to remove the admincount setting instead of ADUC.