Hello. I noticed that the API docs give Powershell examples using Invoke-WebRequest instead of Invoke-RestMethod. I tend to prefer the latter due to its native deserialization of json and xml responses and due to the improvement of the cmdlet in powershell versions 6 and 7. A member of our team let us know that the doc examples use WebRequest because the Automox engineers have found “…Invoke-WebRequest to be more consistent in it’s returns with less errors…”
Could someone expound on those errors? I’m planning to have my team build scripts with RestMethod and am wondering about some of the errors you’ve seen with it.