Skip to content

Instantly share code, notes, and snippets.

@andy51002000
Created June 16, 2019 23:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andy51002000/b294cc94586a3fbc7b82afedaf936142 to your computer and use it in GitHub Desktop.
Save andy51002000/b294cc94586a3fbc7b82afedaf936142 to your computer and use it in GitHub Desktop.
Query Azure resource information and access the json output
$appUserPWD= $(az webapp deployment list-publishing-profiles --name $appname --resource-group $resouceGroup --query '[0].{userPWD:userPWD,userName:userName}' -o json | ConvertFrom-Json )
$appUserPWD
$appUserPWD.userPWD
# Result >
# PS C:\Windows\system32> $appUserPWD
#
# userName userPWD
# -------- -------
# $webSite-botapp-123fz3m6x4 hm7lwb8rqpARtLki9uz5Thx6oFadERGWaX1vgjXQ1eyCrdT
#
#
# PS C:\Windows\system32> $appUserPWD.userName
# $webSite-botapp-123fz3m6x4