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