Not sure regarding the Availability monitoring. I’ve used that in the past, but I’ve not delved into it specifically like this.
I have done what you are asking with standalone monitors/rules though with a rough example as follows.
In the MP you just need to pass the RunAs profile in as a parameter to your script:
And then just bring them into the PowerShell and do whatever is required on the other end.
#Bring in our parameters
param($sourceID, $managedEntityID, $UserName, $Password)
#Convert to PsCredential (or can do it manually in the headers of whatever is required)
$Credential = [pscredential]::new($UserName,$Password)
#Make the call out
$Results = Invoke-RestMethod -Uri 'https://whatever.tld' -Method Get -Credential $Credential
So not sure if that will help from an Availability point of view. Might not be supported and could cause problems later down the road if trying to hack it in manually. A more supportable implementation on the SquaredUp front might be to create your own custom PowerShell monitor and then use the availability script (or the reference monitor functionality) to reference that monitor.