Getting the Job ID of an Executing Azure Runbook
March 2, 2018 2 Comments
If you’re calling an Azure runbook, it is sometimes useful to be able to get the Job ID, say, to report back and update the source that initiated the call to a runbook. This is a quick post on how to access that ID in PowerShell.
You can access it via the following:
$PSPrivateMetadata.JobId.Guid
And the output:
How to get the JOB ID when the script is of type ‘Phtyon’ ?
I have not tested with Python, only PowerShell.