How to find the SCOM ID of an SLO

Using SquaredUp DS

To find the SCOM ID of the Service Level Objective (SLO) object, temporarily add an SLA tile configured to the SLO you require.

  1. Click the edit tile button
  2. Click the edit JSON button
  3. The SCOM ID of the SLO will be shown in the JSON after "sloId":

For example:

{
	"_type": "tile/sla",
	"config": {
		"context": {
			"scope": {
				"objectIds": [
					"fb9564cd-3ff1-1b3b-88b1-096111a722d0"
				]
			},
			"extendedProperties": true
		},
		"source": {
			"timeframe": {
				"type": "inherit"
			},
			"sloId": "6d780c91-1579-8e05-bae1-9be459ef0d98"
		},

Using PowerShell

  1. Open a SCOM PowerShell window (on a SCOM server, Start Menu > Microsoft System Center > Operations Manager Shell)
  2. Copy and paste the following single line of PowerShell:
    For Operations Manager 2012 and above, use the following single line of PowerShell:
    (Get-ScomManagementGroup).ServiceLevelAgreements.GetType().GetMethod("GetServiceLevelObjectives", [Type[]]@()).MakeGenericMethod([Microsoft.EnterpriseManagement.Configuration.ManagementPackSLO]).Invoke( (Get-ScomManagementGroup).ServiceLevelAgreements, @() ) | select @{Name="SLA Name";Expression={$_.ConfigurationGroupId.GetElement().DisplayName}},@{Name="SLO Name";Expression={$_.DisplayName}},@{Name="SLO ID";Expression={$_.Id}} | Format-List

    For Operations Manager 2007 R2, use the following single line of PowerShell:
    (Get-ManagementGroupConnection).ManagementGroup.GetType().GetMethod("GetServiceLevelObjectives", [Type[]]@()).MakeGenericMethod([Microsoft.EnterpriseManagement.Configuration.ManagementPackSLO]).Invoke( (Get-ManagementGroupConnection).ManagementGroup,@() ) | select @{Name="SLA Name";Expression={$_.ConfigurationGroupId.GetElement().DisplayName}},@{Name="SLO Name";Expression={$_.DisplayName}},@{Name="SLO ID";Expression={$_.Id}} | Format-List
  3. The results of this command are a list of all SLOs and their SCOM IDs.

Was this article helpful?


Have more questions or facing an issue?