Command Shell Reference
SQL Queries
Welcome to TechNet Blogs Sign in | Join | Help
Find performance collection rule for specific Object, Counter or Instance

Find collection rule that is writing specific performance object to the database

Foreach ($rule in (get-rule | where {$_.category -eq "PerformanceCollection"} | foreach-object {$_.DataSourceCollection}))
    {
    if ($rule.get_Configuration() -match "ObjectName>object</ObjectName")
        {$rule.get_ParentElement().DisplayName}
    }

Find collection rule that is writing specific performance counter to the database

Foreach ($rule in (get-rule | where {$_.category -eq "PerformanceCollection"} | foreach-object {$_.DataSourceCollection}))
    {
    if ($rule.get_Configuration() -match "CounterName>counter</CounterName")
        {$rule.get_ParentElement().DisplayName}
    }

Find collection rule that is writing specific performance counter instance to the database

Foreach ($rule in (get-rule | where {$_.category -eq "PerformanceCollection"} | foreach-object {$_.DataSourceCollection}))
    {
    if ($rule.get_Configuration() -match "InstanceName>instance</InstanceName")
        {$rule.get_ParentElement().DisplayName}
    }

Find collection rule that is writing specific performance object-counter-instance combination to the database

Foreach ($rule in (get-rule | where {$_.category -eq "PerformanceCollection"} | foreach-object {$_.DataSourceCollection}))
    {
    if ($rule.get_Configuration() -match "CounterName>counter</CounterName><ObjectName>object</ObjectName><InstanceName>instance</InstanceName")
        {$rule.get_ParentElement().DisplayName}
    }

main menu

Posted: Thursday, March 19, 2009 7:41 PM by jtalmquist

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker