Jeremy Worden
Jeremy Worden8mo ago

I have a Powershell script that returns

I have a Powershell script that returns data that I convert to Json. However when I "Write-Host $results" all that appears in the results window is a single "]". Any thoughts?
6 Replies
Jeremy Worden
Jeremy Worden8mo ago
No description
Hugo C.
Hugo C.8mo ago
so the way it works in powershell is that the result is the last log line
Jeremy Worden
Jeremy Worden8mo ago
so i wouldn't be able to use the results to pass to another script in a flow?
Hugo C.
Hugo C.8mo ago
it there a way to log this json without the line returns?
Jeremy Worden
Jeremy Worden8mo ago
$compressedJson = $results | ConvertFrom-Json | ConvertTo-Json -Compress -Depth 100 does it for me and returns the whole part thanks
rubenf
rubenf8mo ago
If you can write to result.json, it will parse that instead