Search code examples
powershellscom

What is the difference between Get-SCOMMonitoringObject and get-scomclassinstance in Microsoft SCOM?


I have executed both the commands in powershell

  1. Get-SCOMMonitoringObject
  2. Get-SCOMClassInstance

But I'm getting same results for both the command output.

Is there any significant difference between these two commands?

Environment: SCOM 2012R2 Server


Solution

  • In SCOM 2007, Get-SCOMMonitoringObject is the only command, but it was replaced with Get-SCOMClassInstance command in SCOM 2012. SCOM 2012 doesn't have Get-SCOMMonitoringObject command, but features an alias for it:

    Get-Command Get-SCOMMonitoringObject | fl *
    
    ResolvedCommandName : Get-SCOMClassInstance
    DisplayName         : Get-SCOMMonitoringObject
    ReferencedCommand   : Get-SCOMClassInstance
    ResolvedCommand     : Get-SCOMClassInstance
    Definition          : Get-SCOMClassInstance
    Name                : Get-SCOMMonitoringObject
    CommandType         : Alias