Get current job ID

avatar
Product: PowerShell Universal
Version: 4.0.12


Hi all.
I’m wondering if there is a way to get the job ID of the current job? I’m running a script and want to know what the ID for this job is. I thought the Get-PSUJob would be a good start, but it doesn’t seem to have any arguments for this.

avatar
(anonymous user)

Recommended Answer

$UAJob is populated inside jobs contains info regarding the current running job

Variables - PowerShell Universal

All Comments (2)

avatar

$UAJob is populated inside jobs contains info regarding the current running job

Variables - PowerShell Universal

avatar

Ah, perfect, exactly what I was looking for. Thanks!