I’m trying to create a powershell script that sends a daily report to our techs with active alerts.
We already have groups populated with servers and other objects each tech is responsible for.
I only know basic powershell, but I’ve been looking at other script and I’m now sending a daily report to myself, containing all open alerts, and alerts closed the last 24 hours.
But I can’t figure out how to get the Get-SCOMGroup and Get-SCOMAlert cmdlets to work together so that I can list only alerts with a relationship to a certain group.
I was hoping it was as easy as doing Get-SCOMGroup tech1| Get-SCOMClassInstance | Get-SCOMAlert. But this does not catch all alerts.
Anyone done this, or know how I should go about doing it?
I have a script I use to do this and it runs every day and generates an HTML email to send to engineers for alerts 48hours open. If you get stuck let me know.
(added – I have emailed you some scripts that may help).