Replies: 2 comments 2 replies
-
No, the PowerShell handler uses PowerShell 5, unfortunately. You can call |
Beta Was this translation helpful? Give feedback.
2 replies
-
add pwsh: true to the inputs. - task: PowerShell@2
displayName: RunWithPs7
inputs:
pwsh: true source: https://microsoft-bitools.blogspot.com/2021/02/devops-snack-change-powershell-version.html |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have a task that I need to run under Powershell 7 instead of Powershell 5.
On the task.json file I have the following Execution definition:
"execution": {
"PowerShell3": {
"target": "task.ps1",
"workingDirectory": "$(currentDirectory)",
"argumentFormat": ""
}
The task runs correctly on the Agent server but it runs on Powershell 5, how (if possible) can I run it on Powershell 7?
Beta Was this translation helpful? Give feedback.
All reactions