Get-MsolRole

Gets administrator roles.

Syntax

Get-MsolRole -ObjectId <Guid> [-TenantId <Guid>] [<CommonParameters>]
Get-MsolRole -RoleName <String> [-TenantId <Guid>] [<CommonParameters>]

Description

The Get-MsolRole cmdlet gets a list of administrator roles.

Examples

Example 1: Get administrator roles for the company

PS C:\> Get-MsolRole
This command gets administrator roles for the company.

Parameters

-ObjectId

Specifies the unique object ID of the role to retrieve.

Type:Guid
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)

-RoleName

Specifies the name of the role to retrieve.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)

-TenantId

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
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)

Outputs

Microsoft.Online.Administration.Role

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.