Skip to content

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.

Get-PveTaskExitStatus
[-PveTicket <PveTicket>]
-Upid <string>
[<CommonParameters>]
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:

String. Exit status of the task, empty while it is running. Throws if the status of the task cannot be read.

$r = Start-PveGuest -VmIdOrName web01
if (Wait-PveTaskIsFinish -Upid $r.Response.data -Timeout 60000) { Get-PveTaskExitStatus -Upid $r.Response.data }