Get-SCOMOverrideResult
Get-SCOMOverrideResult
Retrieves override results.
Syntax
Parameter Set: FromClassDiscovery
Get-SCOMOverrideResult [-Class] <ManagementPackClass[]> [-Discovery] <ManagementPackDiscovery[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Parameter Set: FromClassMonitor
Get-SCOMOverrideResult [-Class] <ManagementPackClass[]> [-Monitor] <ManagementPackMonitor[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Parameter Set: FromClassRule
Get-SCOMOverrideResult [-Class] <ManagementPackClass[]> [-Rule] <ManagementPackRule[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Parameter Set: FromInstanceDiscovery
Get-SCOMOverrideResult [-Instance] <EnterpriseManagementObject[]> [-Discovery] <ManagementPackDiscovery[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Parameter Set: FromInstanceMonitor
Get-SCOMOverrideResult [-Instance] <EnterpriseManagementObject[]> [-Monitor] <ManagementPackMonitor[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Parameter Set: FromInstanceRule
Get-SCOMOverrideResult [-Instance] <EnterpriseManagementObject[]> [-Rule] <ManagementPackRule[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]
Detailed Description
The Get-SCOMOverrideResult cmdlet retrieves existing overrides associated with specified workflows that are constrained to a specified class or class instance.
Parameters
-Class<ManagementPackClass[]>
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
".
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-ComputerName<String[]>
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 (.).
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Credential<PSCredential>
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
".
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Discovery<ManagementPackDiscovery[]>
Specifies an array of discovery workflow objects to retrieve. For more information about how to get discovery workflow objects, type"Get-Help Get-SCOMDiscovery
".
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Instance<EnterpriseManagementObject[]>
Specifies an array of instances of a class to retrieve.
Aliases |
none |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Monitor<ManagementPackMonitor[]>
Specifies an array of monitor workflow objects to retrieve. For more information, type"Get-Help Get-SCOMMonitor
".
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Rule<ManagementPackRule[]>
Specifies an array of monitoring rule workflow objects to retrieve. For information about how to get a rule object, type"Get-Help Get-SCOMRule
".
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-SCSession<Connection[]>
Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
Example 1: Retrieve a list of overrides for a specific class
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.
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
Example 2: Retrieve override results by class instance
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.
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
Example 3: Retrieve override results by monitoring rule object
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.
PS C:\> $Rule = Get-SCOMRule –DisplayName "Alert on Failed Power Shell Scripts"
PS C:\> Get-SCOMClass –DisplayName "Memory" | Get-SCOMOverrideResult –Rule $Rule
Example 4: Retrieve override results for a display name
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.
PS C:\> $Discovery = Get-SCOMDiscovery -DisplayName "Discover Windows Server Computers"
PS C:\> Get-SCOMClassInstance -DisplayName "Operations Manager Agents" | Get-SCOMOverrideResult -Discovery $Discovery