PowerTip: Convert JSON File to PowerShell Object

PowerTip: Convert JSON File to PowerShell Object

  • Comments 2
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • I'm seeing more of these daily! Thanks for the simple tip!