Share via


Get-SCOMOverrideResult

Retrieves override results.

Syntax

FromClassDiscovery (Default)

Get-SCOMOverrideResult
    [-Class] <ManagementPackClass[]>
    [-Discovery] <ManagementPackDiscovery[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromClassMonitor

Get-SCOMOverrideResult
    [-Class] <ManagementPackClass[]>
    [-Monitor] <ManagementPackMonitor[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromClassRule

Get-SCOMOverrideResult
    [-Class] <ManagementPackClass[]>
    [-Rule] <ManagementPackRule[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromInstanceDiscovery

Get-SCOMOverrideResult
    [-Instance] <EnterpriseManagementObject[]>
    [-Discovery] <ManagementPackDiscovery[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromInstanceRule

Get-SCOMOverrideResult
    [-Instance] <EnterpriseManagementObject[]>
    [-Rule] <ManagementPackRule[]>
    [-SCSession <Connection[]>]
    [-ComputerName <String[]>]
    [-Credential <PSCredential>]
    [<CommonParameters>]

FromInstanceMonitor

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".

Parameter properties

Type:

ManagementPackClass[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassDiscovery
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
FromClassMonitor
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
FromClassRule
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments: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 (.).

Parameter properties

Type:

String[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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".

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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".

Parameter properties

Type:

ManagementPackDiscovery[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassDiscovery
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
FromInstanceDiscovery
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Instance

Specifies an array of instances of a class to retrieve.

Parameter properties

Type:

EnterpriseManagementObject[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromInstanceDiscovery
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
FromInstanceRule
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False
FromInstanceMonitor
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-Monitor

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

Parameter properties

Type:

ManagementPackMonitor[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassMonitor
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
FromInstanceMonitor
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments: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".

Parameter properties

Type:

ManagementPackRule[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

FromClassRule
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False
FromInstanceRule
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SCSession

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

Parameter properties

Type:

Connection[]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.