We're using the Slack integration and PowerShell script, like so many others are doing. It's really fantastic. One thing we want to do is iterate through the Alert Message (which is passed to the script), and do things. One element of our Alert Message is severity:
Severity: ${N=Alerting;M=Severity}
so I'd like to have an if loop that looks at Severity, and uses different emoji's, dependent on what the value of Severity is. Once the script is running and has that alert message, I'm assuming it is then some sort of PowerShell object, and we can access all the elements inside. Typically when figuring out what's available in a PS object that my scripts are ingesting, I run Visual Studio in debug mode, then I can see everything available in the left pane. For this SolarWinds alert, I'm having trouble just figuring out how I'll be accessing the value of Severity, which should be in Var1
param([string[]]$Var1)
Any suggestions from the more savvy PowerShell folks out there?