Get-XenRoleProperty

Last published : Nov 12, 2026
Gets a property of a Role object.

Syntax

Get-XenRoleProperty [-Role] <Role>
    -XenProperty {Uuid | NameLabel | NameDescription | Subroles | IsInternal | Permissions | PermissionsNameLabel | ByPermission | ByPermissionNameLabel}
    [-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Get-XenRoleProperty [-Ref] <XenRef[Role]>
    -XenProperty {Uuid | NameLabel | NameDescription | Subroles | IsInternal | Permissions | PermissionsNameLabel | ByPermission | ByPermissionNameLabel}
    [-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]

Description

Gets a specified property of a Role object. Use the -XenProperty parameter to select which property to retrieve.
Uuid: Get the uuid field of the given role.
NameLabel: Get the name/label field of the given role.
NameDescription: Get the name/description field of the given role.
Subroles: Get the subroles field of the given role.
IsInternal: Get the is\_internal field of the given role.
Permissions: This call returns a list of permissions given a role.
PermissionsNameLabel: This call returns a list of permission names given a role.
ByPermission: This call returns a list of roles given a permission.
ByPermissionNameLabel: This call returns a list of roles given a permission name.

Parameters

-BestEffort

If set, the cmdlet continues processing further objects instead of throwing a terminating error when an operation fails for one object.
Attribute Value
Type SwitchParameter
Required False
Position Named
Accepts pipeline input False

-Label

The short friendly name of the role. Accepted when -XenProperty is ByPermissionNameLabel.
Attribute Value
Type string
Required False
Position Named
Accepts pipeline input False

-Permission

a reference to a permission. Accepted when -XenProperty is ByPermission.
Attribute Value
Type XenRef[Role]
Required False
Position Named
Accepts pipeline input False

-Ref

The Role object to operate on, specified by its opaque reference.
Attribute Value
Type XenRef[Role]
Required True
Position 0
Accepts pipeline input True (ByPropertyName)
Aliases opaque_ref

-Role

The Role object to operate on.
Attribute Value
Type Role
Required True
Position 0
Accepts pipeline input True (ByValue)

-SessionOpaqueRef

The session object on which to run the cmdlet. This overrides the default session and lets you target a specific open XenServer connection.
Attribute Value
Type string
Required False
Position Named
Accepts pipeline input False

-XenProperty

Selects which property to use.
Attribute Value
Type XenRoleProperty
Required True
Position Named
Accepts pipeline input False
Accepted values Uuid, NameLabel, NameDescription, Subroles, IsInternal, Permissions, PermissionsNameLabel, ByPermission, ByPermissionNameLabel

Inputs

  • Role
  • XenRef[Role]

Outputs

  • System.Object

Examples

Example 1: Get the Subroles property

PS> Get-XenRole -Name "Demo Role" | Get-XenRoleProperty -XenProperty Subroles
Gets the Subroles property of a Role.

Example 2: Get the IsInternal property

PS> Get-XenRole -Name "Demo Role" | Get-XenRoleProperty -XenProperty IsInternal
Gets the IsInternal property of a Role.

Example 3: Get the Permissions property

PS> Get-XenRole -Name "Demo Role" | Get-XenRoleProperty -XenProperty Permissions
Gets the Permissions property of a Role.
  • Class: Role
  • Using the XenServer PowerShell module