Showing posts with label Classes. Show all posts
Showing posts with label Classes. Show all posts

Friday, January 27, 2012

[SQL & SCOM] Retrieve discovered inventory for a class from OperationManager DB

Retrieve table used (and view) used to store the informations for your class

select TypeName, ManagedTypeTableName, ManagedTypeViewName, IsDeleted  from ManagedType
where TypeName LIKE 'MyClassName'

Result will be like :


TypeNameManagedTypeTableNameManagedTypeViewNameIsDeleted
MyClassNameMT_CLS1_OMTV_CLS1_N0



Discovered inventory can be also retrieved by using the view :

select * from MTV_CLS1_N

This posting is provided "AS IS" with no warranties.

Friday, January 13, 2012

[Powershell] Get classes information for all MP in SCOM

Here is a short powershell command to list in a .CSV file all classes information for all SCOM MP using a powershell script :

  1. get-monitoringclass | select-object @{Name="MP";Expression={ foreach-object {$_.GetManagementPack().DisplayName }}}, @{Name="MP Version";Expression={ foreach-object {$_.GetManagementPack().Version }}}, Name, DisplayName, Id, Abstract, Accessibility, Base, Comment, Description, Hosted, LanguageCode, LastModified, ManagementGroup, ManagementGroupId, PropertyCollection, Singleton, Status, TimeAdded, XmlTag  |  sort-object -property MP | export-csv "C:\AllClasses-MyMgtGroupName.csv"

In my case this is usefull to determine what are the Name + ID for all classes for a specific MP to configure monitoring instructions in a tool.

With the same way you can export Rules and Monitors information for all your MP : http://tetris38.blogspot.com/2012/01/powershell-get-rules-information-or.html

This posting is provided "AS IS" with no warranties.