0
votes

Im trying to execute below code from Azure DevOps Pipeline Azure PowerShell task and retrieve the output in Pipeline "Output Variables" and use the output variable as input to the next stage. How to do this? Is the below output array or an object?

PS C:\> Get-AzDataFactoryV2IntegrationRuntimeKey -ResourceGroupName 'rg-test-dfv2' -DataFactoryName 'test-df-eu2' -Name 'test-selfhost-ir'

AuthKey1                                                 AuthKey2
--------                                                 --------
IR@89895504-f647-48fd-8dd3-42fa556d67e3******            IR@89895504-f647-48fd-8dd3-42fa556d67e3****
1

1 Answers

0
votes

The output of this command is an object of PSIntegrationRuntimeKeys, to use the output variable as input to the next stage, you could follow this link - Passing variables from stage to stage in Azure DevOps Release Pipelines.

Update:

You could use the commands below, store the $authkey1 and $authkey2 in separate variables.

$keys = Get-AzDataFactoryV2IntegrationRuntimeKey -ResourceGroupName <group-name> -DataFactoryName joyfactory -Name integrationRuntime2
$authkey1 = $keys.AuthKey1
$authkey2 = $keys.AuthKey2

enter image description here