Skip to content

Instantly share code, notes, and snippets.

@yufufi
Created June 13, 2018 13:16
Show Gist options
  • Save yufufi/01b40219072e3465f1e8b7eb287872d2 to your computer and use it in GitHub Desktop.
Save yufufi/01b40219072e3465f1e8b7eb287872d2 to your computer and use it in GitHub Desktop.
Loop through ARM output and set variables
param (
[Parameter(Mandatory=$true)][string]$ARMOutput
)
$json = $ARMOutput | convertfrom-json
$json.PSObject.Properties | ForEach-Object {
Write-Host "##vso[task.setvariable variable=$($_.name);]$($_.value)"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment