I want to retrieve a list of the objectclasses a user has been assigned. In an LDAP server like ODSEE a query for “uid=username objectclass” returns a list of the objectclasses assigned to the user.
With AD and powershell I am finding that I can only get one objectclass result returned and so far it’s always the “user” objectclass. I’ve tried a couple different methods with no success. Google is coming up emtpy for powershell returning multi-valued attribute values.
I’ve tried these:
get-aduser -Identity “username” -properties objectclass
ObjectClass : user
Gets just one objectclass, the user actually has seven assigned.
Another multi-valued attributes, proxyaddresses, behaves as expected. If I query for it I get a list of all the values;
get-adobject -LDAPFilter “(uid=username)” -properties proxyaddresses
The same results are achieved with get-aduser.