-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGet-BaseClassForReporting.ps1
28 lines (21 loc) · 1.02 KB
/
Get-BaseClassForReporting.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<#
.Synopsis
Gets base class of the specified object and also the management pack of the base class
.DESCRIPTION
Gets base class of the specified object and also the management pack of the base class
.EXAMPLE
Get-SCOMClass -DisplayName 'Mon-ServisIzleme-BNPXE' | Get-Baselass
Name DisplayName MPName MPDisplayName
---- ----------- ------ -------------
Microsoft.SystemCenter.OwnProcessNTService Windows Service Microsoft.SystemCenter.NTService.Library Windows Service Library
#>
[CmdletBinding()]
Param(
[Parameter(ValueFromPipeLine = $true)]
$MonitoringClass
)
Process {
Import-Module OperationsManager
$BaseClass = $MonitoringClass.GetBaseType()
$BaseClass | Select-Object -Property Name,DisplayName, @{Name='MPName';Expression={($_.GetManagementPack()).Name}}, @{Name='MPDisplayName';Expression={($_.GetManagementPack()).DisplayName}}
}