We would like to modify a step in all our deployment processes.
Currently they are running on a specific workerpool.
We now want to change this to use a worker pool variable instead.
This works fine from the ui but can’t find in which property the variable name is stored in?
Can see when set from the ui that step.Actions[0].WorkerPoolId is set to null.
I have written up some example code but you will need to modify it to fit your use case. It uses the Octopus.Client.dll. If you use this exact script, you may need to modify the Spaces ID in the first Invoke-RestMethod to match which space you are working in. You will also need to match your current WorkerPoolId and WorkerPoolVariable name lower in the script for your purposes. As always, please do testing with scripts before using them in production. Please let me know if this works for you or if you need any other assistance.