I am using a basic powershell query to obtain a user's group membership:
(Get-ADUser -Identity JohnB -Properties memberof | Select-Object MemberOf).memberof
This method works great for most users, but for some user accounts the property; "MemberOf" is empty. If I view the the same user's groups in ADUC I can see the user is a member of multiple groups. I am trying to figure out why the groups are not being displayed using the powershell query.
I am looking to either use a different method in powershell or trying to figure out why the current query is not working. I am also not looking to use the Quest PowerShell QAD commands.