Get-XenSubjectProperty
Gets a property of a Subject object.
Syntax
Get-XenSubjectProperty [-Subject] <Subject>
-XenProperty {Uuid | SubjectIdentifier | OtherConfig | Roles | PermissionsNameLabel}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Get-XenSubjectProperty [-Ref] <XenRef[Subject]>
-XenProperty {Uuid | SubjectIdentifier | OtherConfig | Roles | PermissionsNameLabel}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Description
Gets a specified property of a Subject object. Use the -XenProperty parameter to select which property to retrieve.
Uuid: Get the uuid field of the given subject.
SubjectIdentifier: Get the subject\_identifier field of the given subject.
OtherConfig: Get the other\_config field of the given subject.
Roles: Get the roles field of the given subject.
PermissionsNameLabel: This call returns a list of permission names given a subject.
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 |
-Ref
The Subject object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[Subject] |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByPropertyName) |
| Aliases | opaque_ref |
-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 |
-Subject
The Subject object to operate on.
| Attribute | Value |
|---|---|
| Type | Subject |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-XenProperty
Selects which property to use.
| Attribute | Value |
|---|---|
| Type | XenSubjectProperty |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | Uuid, SubjectIdentifier, OtherConfig, Roles, PermissionsNameLabel |
Inputs
-
Subject -
XenRef[Subject]
Outputs
-
System.Object
Examples
Example 1: Get the SubjectIdentifier property
PS> Get-XenSubject -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenSubjectProperty -XenProperty SubjectIdentifier
Gets the SubjectIdentifier property of a Subject.
Example 2: Get the OtherConfig property
PS> Get-XenSubject -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenSubjectProperty -XenProperty OtherConfig
Gets the OtherConfig property of a Subject.
Example 3: Get the Roles property
PS> Get-XenSubject -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenSubjectProperty -XenProperty Roles
Gets the Roles property of a Subject.
Related links
-
Class: Subject
-
Using the XenServer PowerShell module