Export the output of the command to environment variables
The format: /"variable from JSON" | "desired environment variable name"
For example:
Output:
{
"id": "/subscriptions/some-guid/resourceGroups/test",
"location": "northeurope",
"managedBy": null,
"name": "test",
"properties": {
"provisioningState": "Succeeded"
},
"tags": null
}
Environment Variable String:
/location|LOCATION , /name|NAME