Wait-PveTaskIsFinish
Get task is running.
Explained with examples in this guide.
Syntax
Section titled “Syntax”Wait-PveTaskIsFinish [-PveTicket <PveTicket>] -Upid <string> -Response <PveResponse> [-Wait <int>] [-Timeout <int>] [<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: |
-Response |
PveResponse |
Yes | By value, by property name | Response of the call that started the task, e.g. from Start-PveGuest: the UPID is read from its data. When the call failed or returned no task there is nothing to wait for and the result is $true. |
-Wait |
int |
No | By property name | Millisecond wait next check. Default: 500. |
-Timeout |
int |
No | By property name | Millisecond timeout. Default: 10000. |
Output
Section titled “Output”Bool. $True when the task is finished, $False when it is still running at the Timeout. Throws if the status of the task cannot be read.
Example
Section titled “Example”Start-PveGuest -VmIdOrName web01 | Wait-PveTaskIsFinish -Timeout 60000