skip to Main Content

Azure – How to access a nested JSON field in PowerShell

I'm trying to access a specific field in a JSON object created by Azure Advisor using PowerShell. I have the following object: @{id=/subscriptions/xxxx/providers/Microsoft.Advisor/recommendations/xxxx; category=Cost; impact=High; impactedArea=Microsoft.Subscriptions/subscriptions; description=Consider virtual machine reserved instance to save over your on-demand costs; recommendationText=Consider virtual machine…

VIEW QUESTION

Azure – The term 'Connect-AzAccount' is not recognized as a name of a cmdlet

This code is working in my local machine in Powershell ISE, but it is not working in the devops pipeline $AzureTenantId = "dgfg" $AzureApplicationId = "fgfgg" $AzureApplicationSecret = "fdgfghf" $SecuredApplicationSecret = ConvertTo-SecureString "$AzureApplicationSecret" -AsPlainText -Force $psCred = New-Object System.Management.Automation.PSCredential($AzureApplicationId ,…

VIEW QUESTION
Back To Top
Search