Get-ADGroupMember with all user properties

This topic contains 4 replies, has 4 voices, and was last updated by  Chris Stephens 4 years, 7 months ago.

  • Author
  • #11430

    wantto wantto

    how do i get for each user in the group which i get from "Get-ADGroupMember", all the properties of the user which the "Get-ADGroupMember" dont return?

  • #11431

    Don Jones

    You would most likely use a Foreach loop to enumerate each user, and retrieve their full user object from the directory.

  • #11432

    Dave Wyatt

    Pipe the resulting objects to Get-ADUser (though it's probably a good idea to make sure you're actually looking at a user object first), like so:

    Get-ADGroupMember -Identity SomeGroup |
    Where-Object { $_.objectClass -eq 'user' } |
    Get-ADUser -Properties *
  • #11445

    wantto wantto

    thanks Dave!

  • #11551

    Chris Stephens

    While that may work 'ok', you may want to try to leverage Quest ActiveRoles plug-ins for PowerShell if AD Web Services is enabled or running in your environment.

    Get-QADGroupMember 'Group Name' | Get-QADUser -IncludeAllProperties | Select-Object -Property *

You must be logged in to reply to this topic.