I would like to know how to properly create a PowerShell-based Rule that will collect a message send count from my Edge Exchange servers in my environment.
I am already using SCOM + SquaredUp to gather a huge amount of data from the whole infrastructure with like 500~ VMs.
Unfortunately, the Microsoft MPs don’t include such things, like messages send count in exchange servers. Therefore I am here to ask how properly use Powershell Authoring MP from cookdown, and make my life easier.
Firstly I tried some totally basic things, but I am not sure what am I missing with that configuration.
I did create, a Powershell-based rule on a Powershell Authoring MP, and assigned it to the Group with only one VM. (The group that I made before).
$ScomAPI = New-Object -comObject “MOM.ScriptAPI”
$Processes = (Get-process).count
$PropertyBag = $ScomAPI.CreatePropertyBag()
As you can see, I just want to test things out and implement the result to my monitoring as a new value in Performance Viewer.
The schedule is set to “Run every: 5 Minutes”.
I am not sure if everything is set properly, but the result is… Well, I can only say that it isn’t working.
How do I even know if the SCOM does something with that rule?
Should I browse EventViewer on a Vm and check if PowerShell script event started?
So you see… I came here to learn how to use the Powershell Authoring MP properly.
I would like to know how to set a super easy script and implement the result to SCOM property bag.
Any suggestions would be great!