Get-XenTaskProperty
Gets a property of a Task object.
Syntax
Get-XenTaskProperty [-Task] <Task>
-XenProperty {Uuid | NameLabel | NameDescription | AllowedOperations | CurrentOperations | Created | Finished | Status | ResidentOn | Progress | Type | Result | ErrorInfo | OtherConfig | SubtaskOf | Subtasks | Backtrace}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Get-XenTaskProperty [-Ref] <XenRef[Task]>
-XenProperty {Uuid | NameLabel | NameDescription | AllowedOperations | CurrentOperations | Created | Finished | Status | ResidentOn | Progress | Type | Result | ErrorInfo | OtherConfig | SubtaskOf | Subtasks | Backtrace}
[-BestEffort] [-SessionOpaqueRef <string>] [<CommonParameters>]
Description
Gets a specified property of a Task object. Use the -XenProperty parameter to select which property to retrieve.
Uuid: Get the uuid field of the given task.
NameLabel: Get the name/label field of the given task.
NameDescription: Get the name/description field of the given task.
AllowedOperations: Get the allowed\_operations field of the given task.
CurrentOperations: Get the current\_operations field of the given task.
Created: Get the created field of the given task.
Finished: Get the finished field of the given task.
Status: Get the status field of the given task.
ResidentOn: Get the resident\_on field of the given task.
Progress: Get the progress field of the given task.
Type: Get the type field of the given task.
Result: Get the result field of the given task.
ErrorInfo: Get the error\_info field of the given task.
OtherConfig: Get the other\_config field of the given task.
SubtaskOf: Get the subtask\_of field of the given task.
Subtasks: Get the subtasks field of the given task.
Backtrace: Get the backtrace field of the given 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 |
-Ref
The Task object to operate on, specified by its opaque reference.
| Attribute | Value |
|---|---|
| Type | XenRef[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 |
-Task
The Task object to operate on.
| Attribute | Value |
|---|---|
| Type | Task |
| Required | True |
| Position | 0 |
| Accepts pipeline input | True (ByValue) |
-XenProperty
Selects which property to use.
| Attribute | Value |
|---|---|
| Type | XenTaskProperty |
| Required | True |
| Position | Named |
| Accepts pipeline input | False |
| Accepted values | Uuid, NameLabel, NameDescription, AllowedOperations, CurrentOperations, Created, Finished, Status, ResidentOn, Progress, Type, Result, ErrorInfo, OtherConfig, SubtaskOf, Subtasks, Backtrace |
Inputs
-
Task -
XenRef[Task]
Outputs
-
System.Object
Examples
Example 1: Get the AllowedOperations property
PS> Get-XenTask -Name "Demo Task" | Get-XenTaskProperty -XenProperty AllowedOperations
Gets the AllowedOperations property of a Task.
Example 2: Get the CurrentOperations property
PS> Get-XenTask -Name "Demo Task" | Get-XenTaskProperty -XenProperty CurrentOperations
Gets the CurrentOperations property of a Task.
Example 3: Get the Created property
PS> Get-XenTask -Name "Demo Task" | Get-XenTaskProperty -XenProperty Created
Gets the Created property of a Task.
Related links
-
Class: Task
-
Using the XenServer PowerShell module