Get-AzureRmADGroupMember
Lists members of an AD group in the current tenant.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Get-AzureRmADGroupMember
[-GroupObjectId <Guid>]
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzureRmADGroupMember
-GroupDisplayName <String>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Get-AzureRmADGroupMember
-GroupObject <PSADGroup>
[-DefaultProfile <IAzureContextContainer>]
[-IncludeTotalCount]
[-Skip <UInt64>]
[-First <UInt64>]
[<CommonParameters>]
Description
Lists members of an AD group in the current tenant.
Examples
Example 1 - List members by AD group object id
PS C:\> Get-AzureRmADGroupMember -GroupObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE
Lists members of the AD group with object id '85F89C90-780E-4AA6-9F4F-6F268D322EEE'.
Example 2 - List members by AD group object id using paging
PS C:\> Get-AzureRmADGroupMember -GroupObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE -First 100
Lists the first 100 members of the AD group with object id '85F89C90-780E-4AA6-9F4F-6F268D322EEE'.
Example 3 - List members by piping
PS C:\> Get-AzureRmADGroup -ObjectId 85F89C90-780E-4AA6-9F4F-6F268D322EEE | Get-AzureRmADGroupMember
Gets the AD group with object id '85F89C90-780E-4AA6-9F4F-6F268D322EEE' and pipes it to the Get-AzureRmADGroupMember cmdlet to list all members in that group.
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-First
The maximum number of objects to return.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupDisplayName
The display name of the group.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GroupObject
The group object that you are listing members from.
Type: | PSADGroup |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GroupObjectId
Object Id of the group.
Type: | Guid |
Aliases: | Id, ObjectId |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IncludeTotalCount
Reports the number of objects in the data set. Currently, this parameter does nothing.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Skip
Ignores the first N objects and then gets the remaining objects.
Type: | UInt64 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: GroupObject (ByValue)