skip to Main Content

Get a specific field from JSON using PowerShell

I have a variable $result containing JSON data. Write-Host $result ## would give this result: { "format": { "filename": ".\C0001.MP4", "nb_streams": 3, "nb_programs": 0, "format_name": "mov,mp4,m4a,3gp,3g2,mj2", "format_long_name": "QuickTime / MOV", "start_time": "0.000000", "duration": "55.680000", "size": "360720447", "bit_rate": "51827650", "probe_score": 100,…

VIEW QUESTION

Javascript – NodeJS – Child Process – Exec VS Powershell ISE | why are the results different?? why can't the PSCredential be created?

MY PS Script: $admin = "TEST" $Password = ConvertTo-SecureString "Test12345" -AsPlainText -Force $Credential = [PSCredential]::new( $admin, $Password) if ($Credential -is [System.Management.Automation.PSCredential]) { return "PS Credentials - true" } else { return "PS Credentials - false" } RESULT in PS ISE:…

VIEW QUESTION

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
Back To Top
Search