none
Azure Powershell; Get-AzureADGroupMember RRS feed

  • Question

  • Hi,

     

    I want to list the users of a AAD security group (and later to a .csv file).
    If I use the command:

    Get-AzureADGroup -SearchString "Decos Archiefzaken" | Get-AzureADGroupMember

    The result is:

    ObjectId                                                        ObjectType--------                                                          ----------
    46270b5f-ab5c-4306-afdf-8f848b3421df          User
    eef39959-96bb-479e-b138-5f9463109577         User
    04be2d01-250a-408a-92e6-0aaba51e905d        User     

    I just want the names of the members, not there objectid’s, like “Mike Jonson” instead of “46270b5f-ab5c-4306-afdf-8f848b3421df”

    Is there a way to make that possible?

    Thank you in advance,

    F. van ‘t Hoff
    Systemmanager/developer
    Rijksmuseum Amsterdam


    • Moved by Bill_Stewart Wednesday, December 12, 2018 6:18 PM Abandoned
    Wednesday, August 22, 2018 7:50 AM

All replies

  • First you need to learn basic PowerShell.  Your question is answered in lesson #1.

    help select-object -online


    \_(ツ)_/

    Wednesday, August 22, 2018 9:58 AM
  • Hi Frans,

    Which AzureAD module version are you using? I'm at version 2.0.1.6 and can view the DisplayNames in the default output window. However, the Get-AzureADGroupMember documentation shows the same output that you experience.

    You can try either of the following commands to retrieve the output you are looking for:

    # Option 1
    (Get-AzureADGroup -SearchString "Decos Archiefzaken" | Get-AzureADGroupMember).DisplayName
    
    
    # Option 2
    Get-AzureADGroup -SearchString "Decos Archiefzaken" | Get-AzureADGroupMember | Select-Object DisplayName

    Best regards,

    John

    Wednesday, August 22, 2018 12:14 PM