This should work:
Get-Content -Path 'file.txt' -raw | ConvertFrom-Json
It assumes that the content in file.txt is valid JSON format.
More Related Contents:
- Powershell function call changing passed string into int
- PowerShell’s parsing modes: argument (command) mode vs. expression mode
- How do I capture the output into a variable from an external process in PowerShell?
- Running a powershell command using full path and arguments from command line [duplicate]
- Character-encoding problem with string literal in source code
- Delete files older than 15 days using PowerShell
- Output (“echo”) a variable to a text file
- Powershell equivalent of bash ampersand (&) for forking/running background processes
- INI file parsing in PowerShell
- Parameter interpretation when running jobs
- Powershell: Uninstall application by UpgradeCode
- Export-CSV exports length but not name
- How to properly -filter multiple strings in a PowerShell copy script
- Write-Host vs Write-Information in PowerShell 5
- Methods to hex edit binary files via Powershell
- How remove accents in PowerShell?
- Unable to convert a string to an integer variable from DateTaken attribute on a JPG file
- How to Grant permission to user on Certificate private key using powershell?
- Using Invoke-Command -ScriptBlock on a function with arguments
- Powershell – Reboot and Continue Script
- Hashtables and key order
- How can I execute an external program with parameters in PowerShell?
- Should $null be on the left side of the equality comparison? (-eq with arrays)
- Rename file on FTP with PowerShell
- Does PowerShell support HashTable Serialization?
- How can I redirect stdout and stderr without polluting PowerShell error output
- Is there an alternative to GUID when using msiexec to uninstall an application?
- How to run powershell command in batch file
- Is there a PowerShell equivalent of `paste` (i.e., horizontal file concatenation)? [duplicate]
- Getting “Can’t find the drive. The drive called ‘IIS’ does not exist.”