Run the following command:
Get-ADUser -properties MemberOf | select MemberOf | Format-List *
results in something like
Adi Inbar is correct. Let me expand on this by saying if you're having issues, often get-member
is very useful for figuring out what is going on.
PS C:\> ipmo ActiveDirectory
PS C:\> Get-ADUser testuser42 | select memberof | gm
TypeName: Selected.Microsoft.ActiveDirectory.Management.ADUser
Name MemberType Definition
---- ---------- ----------
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
memberof NoteProperty Microsoft.ActiveDirectory.Management.ADPropertyValueCollection memberof=Microsoft.ActiveDir...