Skip to content
3.0 preview2.3.0 stable

These docs describe the preview. Pick the version you run and every page marks what it doesn't have yet. Get the preview →
Maester 2.x docs (archived) →

Sponsor

Get-MtRoleMember

Returns all the members of a role.

Get-MtRoleMember [-Role] <String[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
Get-MtRoleMember [-RoleId] <Guid[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]

The role can be either active or eligible, defaults to getting members that are both active and eligible.

If the assigned member is a group, all members of that group will be returned.

Get-MtRoleMember -Role GlobalAdministrator

Returns all the Global Administrators and includes both Eligible and Active members.

Get-MtRoleMember -Role GlobalAdministrator -MemberStatus Active

Returns all the Global Administrators that are currently active and excludes those that are eligible but not yet active.

Get-MtRoleMember -Role GlobalAdministrator,PrivilegedRoleAdministrator

Returns all the Global Administrators and Privileged Role administrators and includes both Eligible and Active members.

Get-MtRoleMember -RoleId "00000000-0000-0000-0000-000000000000"

Returns all the members of the role with the specified RoleId and includes both Eligible and Active members.

Get-MtRoleMember -RoleId "00000000-0000-0000-0000-000000000000" -MemberStatus Active

Returns all the currently active members of the role with the specified RoleId.

The name of the role to get members for.

Type: String[]
Parameter Sets: RoleName
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The ID of the role to get members for.

Type: Guid[]
Parameter Sets: RoleId
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

The type of members to look for. Default is both Eligible and Active.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

https://maester.dev/docs/commands/Get-MtRoleMember