KB: Gather information for an OpsLogix VMware Management Pack support ticket

Gathering information for the OpsLogix support team.

Use the powershell script below to gather information about your SCOM VMware Management Pack environment. Run the on one of your SCOM Management Servers, save the output and send it back to the support engineer.

## ---------------------------------------------------------------
## support script for getting information in the environment
## ---------------------------------------------------------------
## Michel Kamp
## ---------------------------------------------------------------

# MP to get
$MPName="OpsLogix.IMP.VMWARE"

Import-Module operationsmanager
New-SCOMManagementGroupConnection

## get the MP versions
Write-Output "------ get Mp versions -------"
Get-SCOMManagementPack | where {$_.Name -like "*$MPName*"} | ft Name , version

## get instance count
Write-Output "------ get instance count -------"
Write-Output "------ instance count as total -------"
Get-SCOMClass -Name "$MPName.*" | Get-SCOMMonitoringObject | group -Property LeastDerivedNonAbstractMonitoringClassId | Select @{Name = ‘Name’; expression ={ Get-SCOMClass -id $_.Name}},Count | ft Name , Count –AutoSize
Write-Output "------ instance count per connection -------"
Get-SCOMClass -Name "$MPName.*" | Get-SCOMMonitoringObject | Select-Object -Property *,@{Name = 'Connection'; Expression = {$_.Path.split(';')[0]}} | group -Property Connection | foreach { Write-Output "Connection Name: $($_.Name)" ; $_.Group | group -Property LeastDerivedNonAbstractMonitoringClassId | Select @{Name = ‘Name’; expression ={ Get-SCOMClass -id $_.Name}},Count | ft Name , Count –AutoSize }


# get resource pool info
Write-Output "------ get resource pool info -------"
$x = Get-SCOMClass -Name "OpsLogix.IMP.VMWare.vCenter" | Get-SCOMMonitoringObject
Get-SCOMRelationshipInstance -TargetInstance $x | ft Id, SourceObject , TargetObject

## get configured templates
Write-Output "------ get configured templates -------"
(Get-SCOMManagementGroup).Presentation.GetFolders() | where { $_.Name -like "*TemplateoutputOpsLogixIMP*" } | ft DisplayName

# get overrides
Write-Output "------ get Monitor overrides -------"
Get-SCOMOverride -Class (Get-SCOMClass -Name "$MPName.*" ) -Monitor (Get-SCOMMonitor -Name "$MPName.*") | ft Parameter , Value , Name -AutoSize
Write-Output "------ get Rule overrides -------"
Get-SCOMOverride -Class (Get-SCOMClass -Name "$MPName.*" ) -Rule (Get-SCOMRule -Name "$MPName.*") | ft Parameter , Value , Name -AutoSize
Write-Output "------ get Discovery overrides -------"
Get-SCOMOverride -Class (Get-SCOMClass -Name "$MPName.*" ) -Discovery (Get-SCOMDiscovery -Name "$MPName.*") | ft Parameter , Value , Name -AutoSize