Trying to create a diagnostic task with that runs a Powershell script to get some more information.

My troubble is that i need a parameter from the Alert/Health State to get the right information.
Been banging my head on google for the last day and don’t seem to be closer.

It the IIS 8 Application Pool state monitor, and i whant the instancename from the context as a paramter in the diagnostic so that i can do a

get-website | where $_.name -eq $ParameterFromAlert

But it doesn’t seem to work. I’v tried outputting just the Parameter but it’s Always empty.

Anyone have a working diagnostic/recovery that you can share ?

Patrik Hansson edited question