Powershell 7 - Get-ADUser or Get-ADObject not returning all values for the multivalue "objectClass" property

233 Views Asked by At

Our domain users have person,organizationalPerson,user, and top values in the objectClass property for each user account. Some may have posixAccount as an additional value. Get-ADUser and Get-ADObject only return "user" for objectClass, even if the LDAPFilter is specifically set to objectClass=posixAccount.

Is there some other command or method to retrieve all of the values for objectClass?

E:\(Get-ADUser -LDAPFilter (&(objectClass=top)(name=xxxx))).objectClass
user
E:\(Get-ADUser -LDAPFilter (&(objectClass=person)(name=xxxx))).objectClass
user
E:\(Get-ADUser -LDAPFilter (&(objectClass=posixAccount)(name=xxxx))).objectClass
user
0

There are 0 best solutions below