Don’t do that #24: Use Get-QADUser (Quest) to receive AllMemberOf of a user

By | April 23, 2015

Don’t do that: There is the possibility to to get all the groups (nested) a user is memberOf with the cmdlet “Get-QADuser” of Quest (now DELL).

(Get-QADUser -Identity SamAccountName).AllMemberOf

Do that: The above code works well, but it requires a 3rd party Snapin, there is a native one-liner way to receive “AllMemberOf” for a user.

Get-ADGroup -LDAPFilter "(member:1.2.840.113556.1.4.1941:=$($distinguishedName))"

previous-buttonNext button blue

Leave a Reply

Your email address will not be published.