The example (see sample-azure-pipeline.yml
) uses the pwsh
shortcut for the PowerShell task so it works across platforms.
In Step 1 the inline PowerShell script logic determines and sets the value of the IsFooBar
variable.
It uses "logging commands" to set the variable.
Write-Host "##vso[task.setvariable variable=IsFooBar]$IsFooEqualToBar"