Reputation: 55
Running script to export all Members in a specific AzureAD Group, but only get half and not all users.
I verified that there are members in Azure Portal, but export only gives me half
This is the script I ran:
Get-AzureADgroupmember -objectid "xxxxxxxxxxxxxxxxxxxxxx" | get-azureaduser | Export-Csv -path C:\temp\memberexport.csv
Any reason on why this is exporting only half and not all users in group?
Thank you,
Upvotes: 1
Views: 2023
Reputation: 9664
When you don't specify -All
as well as -Top
optional parameters, then Get-AzureADGroupMember
command may return you only a default number of records (like say 100. I'm not sure on this exact number).
So if you want all the members, try to specify that explicitly by using -All
parameter. Example below:
Get-AzureADgroupmember -objectid "xxxxxxxxxxxxxxxxxxxxxx" -All $true | get-azureaduser | Export-Csv -path C:\temp\memberexport.csv
Upvotes: 1