Access current Instance uuid in PowerShell script

To get the Instance uuid of the current Task during script runtime as a string variable. Use the following method:

This will get a string variable like fbfa8388-7a23-46a9-a318-7f86f4b96955. Always start with the param() header as the first line of your PowerShell script. If so, you are able to access the current Instance uuid anywhere in your script.

To access Robogator proprietary variables with PowerShell, you have to first initialize all variables on the first line of the script with e. g. param($TaskParameter, $MyKey, $followed) and after that it is possible to access the variables in the underlaying script lines.

Updated on February 21, 2025
So, how does that make you feel, now you've read this explanation?