Created
June 16, 2019 23:39
-
-
Save andy51002000/b294cc94586a3fbc7b82afedaf936142 to your computer and use it in GitHub Desktop.
Query Azure resource information and access the json output
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://github.com/dfinke/PowerShellJson
https://stackoverflow.com/questions/16575419/powershell-retrieve-json-object-by-field-value