Access Task Parameters in PowerShell script

This shows how the typed Parameter value is accessible in the script.

Access Task Parameters in PowerShell script

To get a Parameter value as string during the Task script runtime, use the following method:

This method returns the string hello world. Parameters are always read only, so you are not able to set them to a new value during the Task script runtime.

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?