Get-MtRoleMember
SYNOPSIS
Section titled “SYNOPSIS”Returns all the members of a role.
SYNTAX
Section titled “SYNTAX”RoleName (Default)
Section titled “RoleName (Default)”Get-MtRoleMember [-Role] <String[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]RoleId
Section titled “RoleId”Get-MtRoleMember [-RoleId] <Guid[]> [-MemberStatus <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]DESCRIPTION
Section titled “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
Section titled “EXAMPLES”EXAMPLE 1
Section titled “EXAMPLE 1”Get-MtRoleMember -Role GlobalAdministratorReturns all the Global Administrators and includes both Eligible and Active members.
EXAMPLE 2
Section titled “EXAMPLE 2”Get-MtRoleMember -Role GlobalAdministrator -MemberStatus ActiveReturns all the Global Administrators that are currently active and excludes those that are eligible but not yet active.
EXAMPLE 3
Section titled “EXAMPLE 3”Get-MtRoleMember -Role GlobalAdministrator,PrivilegedRoleAdministratorReturns all the Global Administrators and Privileged Role administrators and includes both Eligible and Active members.
EXAMPLE 4
Section titled “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
Section titled “EXAMPLE 5”Get-MtRoleMember -RoleId "00000000-0000-0000-0000-000000000000" -MemberStatus ActiveReturns all the currently active members of the role with the specified RoleId.
PARAMETERS
Section titled “PARAMETERS”The name of the role to get members for.
Type: String[]Parameter Sets: RoleNameAliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-RoleId
Section titled “-RoleId”The ID of the role to get members for.
Type: Guid[]Parameter Sets: RoleIdAliases:
Required: TruePosition: 1Default value: NoneAccept pipeline input: FalseAccept wildcard characters: False-MemberStatus
Section titled “-MemberStatus”The type of members to look for. Default is both Eligible and Active.
Type: StringParameter Sets: (All)Aliases:
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: False-ProgressAction
Section titled “-ProgressAction”Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by Write-Progress.
Type: ActionPreferenceParameter Sets: (All)Aliases: proga
Required: FalsePosition: NamedDefault value: NoneAccept pipeline input: FalseAccept wildcard characters: FalseCommonParameters
Section titled “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.