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.
If the assigned member is a group, all members of that group will be returned.
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,PrivilegedRoleAdministrator
Returns all the Global administrators and Privileged Role administrators and includes both Eligible and Active members.
EXAMPLE 4โ
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 5โ
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.