Blue Clouds
Blue Clouds

Reputation: 8153

How to set Pipeline 'Task version' in YAML in Azure Devops pipeline

How can I set this value in YAML? This is from Azure devops pipeline enter image description here

EDIT: There is a powershell version below the same UI(Preferred PowerShell Version), the question is not about that.

Upvotes: 0

Views: 1433

Answers (2)

Blue Clouds
Blue Clouds

Reputation: 8153

It is set in "@4"

- task: AzurePowerShell@4

Upvotes: 1

Sajeetharan
Sajeetharan

Reputation: 222532

You can just set it as,

steps:
- task: AzurePowerShell@4
  displayName: 'Azure PowerShell script: FilePath'
  inputs:
    azureSubscription: 'Azure Demo'
    preferredAzurePowerShellVersion: 1.0.0

However you should be able to see the relevant YAML code by clicking on the YAML

enter image description here

Upvotes: 1

Related Questions