Get-MtRoleMember
SYNOPSIS
Returns all the members of a role.
SYNTAX
RoleName (Default)
Get-MtRoleMember [-Role] <String[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
RoleId
Get-MtRoleMember [-RoleId] <Guid[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
DESCRIPTION
The role can be either active or eligible, defaults to getting members that are both active and eligible.
EXAMPLES
EXAMPLE 1
Get-MtRoleMember -Role GlobalAdministrator
Returns all the Global administrators and includes both Eligible and Active members.
EXAMPLE 2
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.
EXAMPLE 3
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.
EXAMPLE 4
Get-MtRoleMember -Role GlobalAdministrator,PrivilegedRoleAdministrator
Returns all the Global administrators and Privileged Role administrators and includes both Eligible and Active members.
EXAMPLE 5
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.
EXAMPLE 6
Get-MtRoleMember -RoleId "00000000-0000-0000-0000-000000000000" -MemberStatus Active
Returns all the currently active members of the role with the specified RoleId.
PARAMETERS
-Role
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
-RoleId
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
-MemberStatus
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
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.