[OpsMgr] Collect custom perfomance data (using SDK)

Posted: October 3, 2011 in SCOM, SCOM 2007

just in case you need to add SCOM custom performance data by means of SDK thru powershell. Here it is.

$comp=Get-MonitoringClass -name Microsoft.Windows.Computer | Get-MonitoringObject | ?{$_.DisplayName -match 'YOUR_COMP'}
$counter = new-object -Type Microsoft.EnterpriseManagement.Monitoring.CustomMonitoringPerformanceData("Object","Counter",100)
$comp.InsertCustomMonitoringPerformanceData($counter)
Advertisements
Comments
  1. bradc says:

    i love this. thank you for sharing.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s