I’m trying to use the PowerShell module to query a WebApi and display data in a grid (can’t use the WebApi tile, because I need to request a token first).
I have a script that’s running locally, but regardless of what I do in SquaredUp I get “PowerShell host process returned neither a result nor error”.
Can someone point me to some examples on how to use the PowerShell module to query a WebApi?
Never tried it before for SQ, but likely you may want to have your script do a save a transcript then read on the transcript to see if any errors occurred when running under SQ.
It depends on what you are trying to archive. I have a simple one running like this for a grid tile: Invoke-RestMethod -Uri "https://<pathtosomeRSS-Feed>" -UseDefaultCredentials
Another option that we recommend for large data sets/scripts that might take a while to run is to have the script run somewhere and output to a CSV, then use a simple script in SquaredUp to read the CSV instead. This way, SquaredUp loads the data much faster, as it doesn’t have the bulk of auth and querying the data source.
Hey guys - thank you so much for all of your answers. Obviously, the community is alive and active - awesome !!!
Turns out my issue was due to the json parser (I’m calling it that) in SquaredUp stumbling over a special character. Took me a while to figure out how to use the log and log settings to trace this.
Once I figured out (with help from Afreen from support) that it was a character that was causing this, I took care of it with this: