Working on a powershell monitor to check for account lockouts.
Using the get-aduser powershell command to check lockout status.
I want to send an alert when the account shows as locked out.
seems straightforward when you are checking just one user, like:
bob123 Unlocked
but what about checking a series of names? like:
bob123 Unlocked
mary234 Unlocked
steve345 Locked
tyrell567 Unlocked
Possible to run a powershell script in a component monitor that returns a 'list' and send an alert for just the list member that contains the desired data (in this case 'Locked')?
In a nutshell I want to use Orion to run a "standalone" powershell script and hopefully use the alerting functionality to send an email if a designated account is locked out.
BTW I know you can do this by parsing event ID 4740 on domain controllers for account lockout. We're doing that now in SCOM and truthfully it is hit-and-miss in terms of reliability. I would rather just check lockout status directly on the < 100 service accounts in question and send an email if an account gets locked out.
Thanks in advance for any ideas from the community.