Created
February 27, 2020 20:26
-
-
Save sassdawe/60a7e872356e571e3c8773df3dd234c5 to your computer and use it in GitHub Desktop.
Get a content of a small .json file and return an array of PSCusomObject
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Get-JSONContent { | |
[OutputType([PSCustomObject[]])] | |
[CmdletBinding()] | |
param ( | |
[String] | |
$Path | |
) | |
Get-Content -Path $Path -Raw | ConvertFrom-JSON | Foreach-Object { $_ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment