For the complete documentation index, see llms.txt. This page is also available as Markdown.

Wait-PSUJob

Waits for a job to finish.

SYNOPSIS

Waits for a job to finish.

SYNTAX

ById

Wait-PSUJob -JobId <Int64> [-Timeout <Int32>] [-Silent] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

ByRunId

Wait-PSUJob -JobRunId <Guid> [-Timeout <Int32>] [-Silent] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

ByObject

Wait-PSUJob -Job <Job> [-Timeout <Int32>] [-Silent] [-ComputerName <String>] [-AppToken <String>]
 [-Credential <PSCredential>] [-UseDefaultCredentials] [-Integrated] [-TrustCertificate] [-Cookies]
 [<CommonParameters>]

DESCRIPTION

Waits for a job to finish.

EXAMPLES

Example 1

Waits for job 12 to finish.

PARAMETERS

-AppToken

An app token to access the PSU API.

-ComputerName

The HTTP address of the PSU REST API server.

-Integrated

Executes the command internally rather than using the Management API. Only works when running script from within PowerShell Universal.

-Job

The job to wait for. Use Get-PSUJob to retrieve a Job object.

-JobId

The ID of the job to wait for.

-Timeout

The number of seconds to wait for the job to finish.

-UseDefaultCredentials

Use default credentials when connecting to the management API

-JobRunId

The run ID of the job to wait for.

-Credential

Credentials to login to the PowerShell Universal Management API.

-Silent

Prevents interaction with the PowerShell Host. Streams will not be written and Read-Host will not be invoked.

-TrustCertificate

Whether the cmdlet should ignore certificate issues.

-Cookies

Reuses and persists authentication cookies for the current PowerShell session.

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -Verbose, -WarningAction, -WarningVariable, and -ProgressAction. For more information, see about_CommonParameters.

INPUTS

UniversalAutomation.Job

OUTPUTS

System.Object

NOTES

Last updated

Was this helpful?