Ok... i was able to get this working...
Here's what i've done...
- I have created and published another runbook using the default PS 7.2 runtime environment.
- I have upgraded the runtime of my runbook to my "custom PS 7.4" runtime environment
- On the hybrid worker, i have added the environment variable "POWERSHELL_7_4_PATH" with the value "C:\Program Files\PowerShell\7"
This worked.
What i have also found is that Automation Account does not Support PS 7.4 so far. So if you create a runbook using a custom PS 7.4 runtime environment and then you switch to the "old experience", if you look in the runbooks, you will notice that the runbook you have created will be in runtime 5.1.
Thanks all
hth