I’m trying to use a powershell with the invoke rest-method, and it is working perfectly except BigFix thinks that the file is invalid json syntax. When I copy the file text to any json validator it says that is valid json. Any idea on what is causing this to happen?
Code is as follows:
Invoke-RestMethod ‘XXXXX’ -Method ‘GET’ -Headers $headers -Body $body | ConvertTo-Json -Depth 100 | Out-File “XXXX”