Memberof is returned as a collection (array).

Do this instead

        get-aduser -id username -properties memberof | select -expand memberof 
| fl

If you want more detail, use your favorite search engine to investigate 
FormatEnumerationLimit (which by default is 4).

-----Original Message-----
From: [email protected] [mailto:[email protected]] On 
Behalf Of Kurt Buff
Sent: Wednesday, May 6, 2015 12:53 PM
To: [email protected]
Subject: [powershell] What's the difference?

I'm not worried about nested memberships...

This incantation only gives me 4 groups for a user:
get-aduser -id username -properties memberof | select memberof | fl

This incantation gives me all of the groups (around 15 or so):
(get-aduser -id username -properties memberof | select-object memberof),memberof

Kurt


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1


================================================
Did you know you can also post and find answers on PowerShell in the forums?
http://www.myitforum.com/forums/default.asp?catApp=1

Reply via email to