Get-PveTaskExitStatus
Get the exit status of a finished task: ‘OK’ when it succeeded, otherwise the error of the task.
Explained with examples in this guide.
Syntax
Section titled “Syntax”Get-PveTaskExitStatus [-PveTicket <PveTicket>] -Upid <string> [<CommonParameters>]Parameters
Section titled “Parameters”| Parameter | Type | Required | Pipeline | Description |
|---|---|---|---|---|
-PveTicket |
PveTicket |
No | By property name | Ticket data connection. |
-Upid |
string |
Yes | By value, by property name | Upid task e.g UPID:pve1:00004A1A:0964214C:5EECEF11:vzdump:134:root@pam: |
Output
Section titled “Output”String. Exit status of the task, empty while it is running. Throws if the status of the task cannot be read.
Example
Section titled “Example”$r = Start-PveGuest -VmIdOrName web01if (Wait-PveTaskIsFinish -Upid $r.Response.data -Timeout 60000) { Get-PveTaskExitStatus -Upid $r.Response.data }