Disable-SCOMMonitor

Disable-SCOMMonitor

Disables monitors in Operations Manager.

Syntax

Parameter Set: Empty
Disable-SCOMMonitor [-ManagementPack] <ManagementPack> [-Monitor] <ManagementPackMonitor[]> [[-Enforce]] [[-PassThru]] [ <CommonParameters>]

Parameter Set: FromGroup
Disable-SCOMMonitor [[-Group] <MonitoringObject[]> ] [-ManagementPack] <ManagementPack> [-Monitor] <ManagementPackMonitor[]> [[-Enforce]] [[-PassThru]] [ <CommonParameters>]

Parameter Set: FromInstance
Disable-SCOMMonitor [[-Instance] <MonitoringObject[]> ] [-ManagementPack] <ManagementPack> [-Monitor] <ManagementPackMonitor[]> [[-Enforce]] [[-PassThru]] [ <CommonParameters>]

Parameter Set: FromManagementPackClass
Disable-SCOMMonitor [-Class] <ManagementPackClass[]> [-ManagementPack] <ManagementPack> [-Monitor] <ManagementPackMonitor[]> [[-Enforce]] [[-PassThru]] [ <CommonParameters>]

Detailed Description

The Disable-SCOMMonitor cmdlet disables monitors in System Center 2012 – Operations Manager. In Operations Manager, monitors define logic for determining the health of an object. The cmdlet disables monitors by creating and saving overrides that modify the default behavior of a monitor.

Parameters

-Class<ManagementPackClass[]>

Specifies an array of class objects. For information about how to get a 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

-Enforce

Indicates that the cmdlet sets the Enforce property on the override to $True.

Aliases

none

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Group<MonitoringObject[]>

Specifies an array of one or more group objects. For information about how to get a group object, type Get-Help Get-SCOMGroup.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Instance<MonitoringObject[]>

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.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

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

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Monitor<ManagementPackMonitor[]>

Specifies an array of one or more monitor objects. For information about how to get a monitor object, type Get-Help Get-SCOMMonitor.

Aliases

none

Required?

true

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-PassThru

Indicates that the cmdlet creates or modifies an object that a command can use in the pipeline. By default, this cmdlet does not generate any output.

Aliases

none

Required?

false

Position?

4

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: Disable a monitor

This example disables 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 Disable-SCOMMonitor cmdlet to disable the monitor by using the Enforce parameter. The cmdlet stores the override in the variable named $MP.

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:\> Disable-SCOMMonitor -Class $Class -ManagementPack $MP -Monitor $Monitor -Enforce

Get-SCOMClass

Get-SCOMClassInstance

Get-SCOMManagementPack

Enable-SCOMMonitor

Get-SCOMMonitor