I have a Azure Devops Pipeline $PIPELINE with a task group $TASKGROUP, and one of the actions in that task group is a powershell task $TASK ( a powershell task, not a AzureCloudPowerShellDeployment task or AzurePowershell task, which are different and have answers to this question)
I'd like to run the task under powershell 5.1 because of some features in the script I'm running require it (mainly $PSEdition, which some of the script's module dependencies expect). However, there doesn't seem to be any way to force a specific version of powershell
How can I force the $TASK to run with powershell version 5.1 or higher?