Enable-SCOMMonitor
Enables monitors in Operations Manager.
Syntax
Enable-SCOMMonitor
[-Monitor] <ManagementPackMonitor[]>
[-ManagementPack] <ManagementPack>
[-Enforce]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-SCOMMonitor
[-Monitor] <ManagementPackMonitor[]>
[[-Group] <MonitoringObject[]>]
[-ManagementPack] <ManagementPack>
[-Enforce]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-SCOMMonitor
[-Monitor] <ManagementPackMonitor[]>
[-Class] <ManagementPackClass[]>
[-ManagementPack] <ManagementPack>
[-Enforce]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Enable-SCOMMonitor
[-Monitor] <ManagementPackMonitor[]>
[[-Instance] <MonitoringObject[]>]
[-ManagementPack] <ManagementPack>
[-Enforce]
[-PassThru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Enable-SCOMMonitor cmdlet enables monitors in System Center - Operations Manager. In Operations Manager, monitors define logic for determining the health of an object.
Examples
Example 1: Enable a monitor
PS C:\>$MP = Get-SCOMManagementPack -Displayname "My SQL MP Customization" | where {$_.Sealed -eq $False}
PS C:\> $Class = Get-SCOMClass -DisplayName "SQL DB Engine"
PS C:\> $Monitor = Get-SCOMMonitor -DisplayName "*memory*"
PS C:\> Enable-SCOMMonitor -Class $Class -ManagementPack $MP -Monitor $Monitor -Enforce
This example enables an Operations Manager monitor.
The first command uses the Get-SCOMManagementPack cmdlet to get a management pack object, and it stores the result in the variable named $MP.
The second command uses the Get-SCOMClass cmdlet to get a class object, and it stores the result in the variable named $Class.
The third command uses the Get-SCOMMonitor cmdlet to get a monitor object, and it stores the result in the variable named $Monitor.
The fourth command uses the Enable-SCOMMonitor cmdlet to enable the monitor by using the Enforce parameter.
Parameters
-Class
Specifies an array of class objects.
For information about how to get a class object, type "Get-Help Get-SCOMClass
".
Type: | ManagementPackClass[] |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Enforce
Indicates that the cmdlet sets the Enforce property on the override to $True.
Type: | SwitchParameter |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Group
Specifies an array of group objects.
For information about how to get a group object, type "Get-Help Get-SCOMGroup
".
Type: | MonitoringObject[] |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Instance
Specifies an array of class instance objects.
The Instance parameter also accepts group objects as input.
For information about how to get a class instance object, type "Get-Help Get-SCOMClassInstance
".
Type: | MonitoringObject[] |
Position: | 1 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ManagementPack
Specifies one or more management pack objects where you can save the override.
If the monitor is in an unsealed management pack, you must save the overrides into the same management pack.
For information about how to get a management pack object, type "Get-Help Get-SCOMManagementPack
".
Type: | ManagementPack |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Monitor
Specifies an array of monitor objects.
For information about how to get a monitor object, type "Get-Help Get-SCOMMonitor
".
Type: | ManagementPackMonitor[] |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PassThru
Indicates that the cmdlet creates or modifies an object that a command can use in a pipeline. By default, this cmdlet does not generate any output.
Type: | SwitchParameter |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |