Jeremy Worden
Jeremy Worden11mo 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 WordenOP11mo ago
No description
Hugo
Hugo11mo ago
so the way it works in powershell is that the result is the last log line
Jeremy Worden
Jeremy WordenOP11mo ago
so i wouldn't be able to use the results to pass to another script in a flow?
Hugo
Hugo11mo ago
it there a way to log this json without the line returns?
Jeremy Worden
Jeremy WordenOP11mo ago
$compressedJson = $results | ConvertFrom-Json | ConvertTo-Json -Compress -Depth 100 does it for me and returns the whole part thanks
rubenf
rubenf11mo ago
If you can write to result.json, it will parse that instead

Did you find this page helpful?