This is very promising - thanks.
I have two items though.
- I had to add -UseBasicParsing in the line below due to a message about Internet Explorer. I’m not sure if this will affect anything, or more specifically #2 below. I have another script where I interrogate webpages where I had to do this with no other issues.
$result = Invoke-WebRequest -Uri $URI -Method Post -Body $postParams -UseBasicParsing
- I’m getting a web response of:
StatusCode : 200
StatusDescription : OK
Content : ERROR: Invalid automation secret for user myusername
I 100% know that the password I’m using is correct.
I assume $mycheckmkuser and $mycheckmsecret are to be set with the username and password I use to log into CheckMK.
I don’t know how to get past this issue.