Wait-PveTaskIsFinishedWithProgress
Wait for a task to finish, show Powershell Progressbar while waiting
Explained with examples in this guide.
Syntax
Section titled “Syntax”Wait-PveTaskIsFinishedWithProgress [-PveTicket <PveTicket>] -Upid <string> -Response <PveResponse> [-Wait <int>] [-Timeout <int>] [-ProgressActivityText <string>] [-ProgressStatusText <string>] [-ProgressActivityId <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. |
-ProgressActivityText |
string |
No | By property name | Activity (Text) for Write-Progress, defaults to Upid when empty. |
-ProgressStatusText |
string |
No | By property name | Status-Text for Write-Progress, default is “Waiting…”, is shown in front of remaining time and percent. Default: "Waiting...". |
-ProgressActivityId |
int |
No | By property name | Id for Write-Progress, change when other Write-Progress is already shown. Default: 1. |
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.