Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

azure devops set environment variable powershell

$myXml = [xml](Get-Content ./MyXml.xml)  
$departmentId = $myXml.Department.Id

Write-Host "##vso[task.setvariable variable=DepartmentId;]$departmentId"
Write-Host "Set environment variable to ($env:DepartmentId)"

Get-ChildItem Env:

Write-Host "Department Id ($departmentId)"
 
PREVIOUS NEXT
Tagged: #azure #devops #set #environment #variable #powershell
ADD COMMENT
Topic
Name
4+4 =