external help file | online version | schema | ms.assetid | ms.reviewer | ms.custom |
---|---|---|---|---|---|
Microsoft.Online.Administration.Automation.PSModule.dll-Help.xml |
2.0.0 |
16B61372-E804-41E7-9B03-8752A76DD2CB |
stevemutungi |
iamfeature=PowerShell |
Gets members of a role who are granted that role over an administrative unit.
Get-MsolScopedRoleMember [-AdministrativeUnitObjectId <Guid>] [-RoleObjectId <Guid>] [-MaxResults <Int32>]
[-TenantId <Guid>] [<CommonParameters>]
Get-MsolScopedRoleMember [-AdministrativeUnitObjectId <Guid>] [-RoleObjectId <Guid>] [-All] [-TenantId <Guid>]
[<CommonParameters>]
The Get-MsolScopedRoleMember cmdlet gets members of the specified role who are granted that role over an administrative unit.
PS C:\> $WestCoastAu = Get-MsolAdministrativeUnit -SearchString "West Coast"
PS C:\> $UaAdmin = Get-MsolRole -RoleName "User Account Administrator"
PS C:\> Get-MsolScopedRoleMember -RoleObjectId $UaAdmin.ObjectId -AdministrativeUnitObjectId $WestCoastAu.ObjectId
This example gets all members of the User Account Administrator role that is scoped to the administrative unit named West Coast.
Specifies the unique object ID of the role from which to get members.
Type: Guid
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the unique object ID of the administrative unit. If you do not specify this parameter, this cmdlet gets administrators for all administrative units.
Type: Guid
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the maximum number of results that this cmdlet returns.
Type: Int32
Parameter Sets: ListRoleScopedMembers__0
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies the unique ID of the tenant on which to perform the operation. The default value is the tenant of the current user. This parameter applies only to partner users.
Type: Guid
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Indicates that this cmdlet returns all results that it finds. Do not specify this parameter and the MaxResults parameter.
Type: SwitchParameter
Parameter Sets: All__0
Aliases:
Required: True
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 (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet returns objects that contain the following information:
- DisplayName. The display name of the scoped role member.
- UserPrincipalName. The user principal name of the scoped role member.
- ObjectId. The unique ID of the scoped role member.