Get-XenDRTaskProperty
Gets a property of a DRTask object.
Syntax
Get-XenDRTaskProperty [-DRTask] <DR_task> -XenProperty {Uuid | IntroducedSRs}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Get-XenDRTaskProperty [-Ref] <XenRef[DR_task]> -XenProperty {Uuid | IntroducedSRs}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Description
Gets a specified property of a DRTask object. Use the -XenProperty parameter to select which property to retrieve.
Uuid: Get the uuid field of the given DR\_task.
IntroducedSRs: Get the introduced\_SRs field of the given DR\_task.
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 |
-DRTask
The DRTask object to operate on.
| Attribute | Value |
|---|---|
| Type | DR_task |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-Ref
The DRTask object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[DR_task] |
| 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 |
-XenProperty
Selects which property to use.
| Attribute | Value |
|---|---|
| Type | XenDRTaskProperty |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | Uuid, IntroducedSRs |
Inputs
-
DR_task -
XenRef[DR_task]
Outputs
-
System.Object
Examples
Example 1: Get the IntroducedSRs property
PS> Get-XenDRTask -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenDRTaskProperty -XenProperty IntroducedSRs
Gets the IntroducedSRs property of a DRTask.
Example 2: Get the Uuid property
PS> Get-XenDRTask -Uuid 1871ac51-ce6b-efc3-7fd0-28bc65aa39ff | Get-XenDRTaskProperty -XenProperty Uuid
Gets the Uuid property of a DRTask.
Example 3: Get the IntroducedSRs property by reference
PS> Get-XenDRTaskProperty -XenProperty IntroducedSRs -Ref OpaqueRef:f433bf7b-2b0c-5f53-7018-7d195addb3ca
Gets the IntroducedSRs property of a DRTask. -Ref takes the opaque reference, which is what the API itself uses and what the records hold.
Related links
-
Class: DRTask
-
Using the XenServer PowerShell module