Get-SCOMOverrideResult
Get-SCOMOverrideResult
Retrieves override results.
構文
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>]
詳細説明
The Get-SCOMOverrideResult cmdlet retrieves existing overrides associated with specified workflows that are constrained to a specified class or class instance.
パラメーター
-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
".
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
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 (.).
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
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
".
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
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
".
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
false |
-Instance<EnterpriseManagementObject[]>
Specifies an array of instances of a class to retrieve.
エイリアス |
なし |
必須? |
true |
位置は? |
1 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
false |
-Monitor<ManagementPackMonitor[]>
Specifies an array of monitor workflow objects to retrieve. For more information, type"Get-Help Get-SCOMMonitor
".
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
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
".
エイリアス |
なし |
必須? |
true |
位置は? |
2 |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
false |
-SCSession<Connection[]>
Specifies an array of Connection objects. To obtain a Connection object, use the Get-SCManagementGroupConnection cmdlet.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
true (ByValue) |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
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