2

This PS command is only returning 10 out of 12 groups that the user is member of. Anyone know why that will be?

Get-ADUser -Identity username -Properties memberOf | Select -ExpandProperty memberOf > C:\user.csv
TessellatingHeckler
  • 5,726
  • 3
  • 26
  • 44
JasonXray
  • 21
  • 1
  • 4
    Are any of the missing group memberships nested groups? Also, you won't see the Primary Group (usually Domain Users) from `Get-ADUser`. – jscott Jul 28 '14 at 18:28
  • Okay so domain users is accounted for and this link showed why http://social.technet.microsoft.com/forums/windowsserver/en-US/44ecf833-e644-411b-9ef0-fa56b7fb4e26/domain-users-not-showing-up-in-memberof. Running the command second time brought up 11 groups so its possible it needed to update. I think we are good, thanks for your help. – JasonXray Jul 28 '14 at 18:56
  • 8
    Please post that as an answer and [mark it as accepted](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work) when you are able. This will ensure the question is not orphaned as open. – jscott Jul 28 '14 at 18:58

1 Answers1

0

To get the complete list i would use:

Get-ADPrincipalGroupMembership -Idendtity username | Select-Object name | Export-CSV c:\membership.csv
Lachie White
  • 155
  • 8