Get-SCOMOverrideResult

Retrieves override results.

Syntax

Get-SCOMOverrideResult
   [-Class] <ManagementPackClass[]>
   [-Discovery] <ManagementPackDiscovery[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCOMOverrideResult
   [-Class] <ManagementPackClass[]>
   [-Monitor] <ManagementPackMonitor[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCOMOverrideResult
   [-Class] <ManagementPackClass[]>
   [-Rule] <ManagementPackRule[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCOMOverrideResult
   [-Instance] <EnterpriseManagementObject[]>
   [-Discovery] <ManagementPackDiscovery[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCOMOverrideResult
   [-Instance] <EnterpriseManagementObject[]>
   [-Rule] <ManagementPackRule[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]
Get-SCOMOverrideResult
   [-Instance] <EnterpriseManagementObject[]>
   [-Monitor] <ManagementPackMonitor[]>
   [-SCSession <Connection[]>]
   [-ComputerName <String[]>]
   [-Credential <PSCredential>]
   [<CommonParameters>]

Description

The Get-SCOMOverrideResult cmdlet retrieves existing overrides associated with specified workflows that are constrained to a specified class or class instance.

Examples

Example 1: Retrieve a list of overrides for a specific class

PS C:\>$Class = Get-SCOMClass -DisplayName "Memory"
PS C:\> $Discovery = Get-SCOMDiscovery -DisplayName "Discover Windows Server Computers"
PS C:\> $Session = Get-SCOMManagementGroupConnection -ComputerName "Server01.Contoso.com"
PS C:\> Get-SCOMOverrideResult -Class $Class -Discovery $Discovery -SCSession $Session

This example gets the override result for a specific class.

The first command uses the Get-SCOMClass cmdlet to get the class object named Memory and stores the object in the $Class variable.

The second command uses the Get-SCOMDiscovery cmdlet to get the discovery object with the display name Discover Windows Server Computers, and stores the object in the $Discovery variable.

The third command uses the Get-SCOMManagementGroupConnection cmdlet to get the management group connection object for Server01 and stores the object in the $Session variable.

The last command uses the Get-SCOMOverrideResult cmdlet to get the list of overrides for the specified discovery, scoped to the specified class, for the specified management group connection, and returns information about the override result to the user.

Example 2: Retrieve override results by class instance

PS C:\>$Instance = Get-SCOMClassInstance -DisplayName "Operations Manager Agents"
PS C:\> $Monitor = Get-SCOMMonitor -DisplayName "Management Service connectivity state"
PS C:\> Get-SCOMOverrideResult -Instance $Instance -Monitor $Monitor

This example gets the override result for a specific class instance.

The first command uses the Get-SCOMClassInstance cmdlet to get the class instance object named Operations Manager Agents and stores the object in the $Instance variable.

The second command uses the Get-SCOMMonitor cmdlet to get the monitor object with the display name Management Service connectivity state and stores the object in the $Monitor variable.

The last command uses the Get-SCOMOverrideResult cmdlet to get the override result for the specified instance and monitor, and returns information about the override result to the user.

Example 3: Retrieve override results by monitoring rule object

PS C:\>$Rule = Get-SCOMRule -DisplayName "Alert on Failed Power Shell Scripts"
PS C:\> Get-SCOMClass -DisplayName "Memory" | Get-SCOMOverrideResult -Rule $Rule

This example gets the override result for a monitoring rule object.

The first command uses the Get-SCOMRule cmdlet to get the monitoring rule object with the display name Alert on Failed Power Shell Scripts and stores the object in the $Rule variable.

The second command uses the Get-SCOMClass cmdlet to get the class object named Memory and uses the pipeline operator to pass the object to the Get-SCOMOverrideResult cmdlet, which gets the override result for the specified rule, scoped to the piped class object.

Example 4: Retrieve override results for a display name

PS C:\>$Discovery = Get-SCOMDiscovery -DisplayName "Discover Windows Server Computers"
PS C:\> Get-SCOMClassInstance -DisplayName "Operations Manager Agents" | Get-SCOMOverrideResult -Discovery $Discovery

This example gets the override result for a specific display name.

The first command uses the Get-SCOMDiscovery cmdlet to get the discovery object with the display name Discover Windows Server Computers and stores the object in the $Discovery variable.

The second command uses the Get-SCOMClassInstance cmdlet to get the class instance object named Operations Manager Agents and uses the pipeline operator to pass the object to Get-SCOMOverrideResult which gets the override result for the specified discovery, scoped to the piped class instance object.

Parameters

-Class

Specifies an array of management pack class objects. For more information about how to get a management pack class object, type"Get-Help Get-SCOMClass".

Type:ManagementPackClass[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ComputerName

Specifies an array of names of computers. The cmdlet establishes temporary connections with management groups for these computers. You can use NetBIOS names, IP addresses, or fully qualified domain names (FQDNs). To specify the local computer, type the computer name, localhost, or a dot (.).

Type:String[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Credential

Specifies a PSCredential object for the management group connection. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type "Get-Help Get-Credential".

Type:PSCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Discovery

Specifies an array of discovery workflow objects to retrieve. For more information about how to get discovery workflow objects, type"Get-Help Get-SCOMDiscovery".

Type:ManagementPackDiscovery[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Instance

Specifies an array of instances of a class to retrieve.

Type:EnterpriseManagementObject[]
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Monitor

Specifies an array of monitor workflow objects to retrieve. For more information, type"Get-Help Get-SCOMMonitor".

Type:ManagementPackMonitor[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Rule

Specifies an array of monitoring rule workflow objects to retrieve. For information about how to get a rule object, type"Get-Help Get-SCOMRule".

Type:ManagementPackRule[]
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SCSession

Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.

Type:Connection[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False