Hi,
I’m trying to build some pipelines in Azure Devops, and need a way to loop through a hashtable or PSObject and create DevOps variables that can be passed through the pipeline.
for example:
$myVariables = @{ 'ID' = 'kf5jkdfgjld' 'Acc' = '4489933' } # now need to take those values and pass to this cmdlet
foreach ($Item in $myVariables){ Write-Host "##vso[task.setvariable variable=$MyVariable.Key]$MyVariable.Value" }The idea the the hashtable could contain loads of values and i dont want create a line for everyone.
Hope that makes senes.
Thanks