Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Convert JSON File to PowerShell Object

$
0
0

Summary: Easily convert a JSON file to a Windows PowerShell object.

Hey, Scripting Guy! Question How do I convert a JSON file to a Windows PowerShell object?

Hey, Scripting Guy! Answer Use the Get-Content cmdlet with the Raw parameter:

Get-Content -Raw -Path <jsonFile>.json | ConvertFrom-Json


Viewing all articles
Browse latest Browse all 3333

Trending Articles