external help file: Microsoft.Online.Administration.Automation.PSModule.dll-Help.xml online version: schema: 2.0.0 ms.assetid: 430D359B-200B-4EA6-A6B7-D347A0264CC9 ms.reviewer: rodejo ms.custom: iamfeature=PowerShell
Gets administrator roles.
Get-MsolRole [-TenantId <Guid>] [<CommonParameters>]
Get-MsolRole -ObjectId <Guid> [-TenantId <Guid>] [<CommonParameters>]
Get-MsolRole -RoleName <String> [-TenantId <Guid>] [<CommonParameters>]
The Get-MsolRole cmdlet gets a list of administrator roles.
PS C:\> Get-MsolRole
This command gets administrator roles for the company.
Specifies the unique object ID of the role to retrieve.
Type: Guid
Parameter Sets: GetRole__0
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Specifies the name of the role to retrieve.
Type: String
Parameter Sets: GetRoleByName__0
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
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
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 role objects that contain the following fields:
-
Description. A description of the role.
-
IsEnabled. Whether or not the role is enabled.
-
IsSystem. Whether or not the role was created by Azure Active Directory.
-
Name. The name of the role.
-
ObjectId. The unique ID of the role.