Working on a PowerShell monitor to check for account lockouts.
Each account to check configured as its own Component Monitor within the application.
Successfully created the monitor(s) that return account name and LockedOut status (False/True)
Successfully returning output pairs for Message.AccountName, Statistic.AccountName and Message.AccountStatus, Statistic.AccountStatus
Successfully created logic to turn Component Monitor health state Critical when Statistic.AccountStatus is 1 (for LockedOut True verses 0 for LockedOut False)
Successfully created an alert with email action to fire when this (these) Component Monitor(s) go to Critical Status.
Last requirement that I'm having trouble with: Insert the Message.AccountName (serviceacct1) and Message.AccountStatus (Locked) into the Subject and Body of the alert email. I've been looking through the SAM documentation and forums as best possible and so far have not found where the script output can be used as an alert variable.
Any assistance from the community would be greatly appreciated. Thanks.