Export (0) Print
Expand All
Expand Minimize

Get-SCOMMonitor

Updated: January 26, 2014

Applies To: System Center 2012 R2 Operations Manager

Get-SCOMMonitor

Retrieves monitors in Operations Manager.

Syntax

Parameter Set: Empty
Get-SCOMMonitor [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromEMO
Get-SCOMMonitor [-Instance] <EnterpriseManagementObject[]> [[-Recurse]] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementPack
Get-SCOMMonitor [-ManagementPack] <ManagementPack[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromManagementPackClass
Get-SCOMMonitor [-Target] <ManagementPackClass[]> [[-Recurse]] [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromMonitoringDisplayRuleName
Get-SCOMMonitor [-DisplayName] <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromMonitoringRuleId
Get-SCOMMonitor -Id <Guid[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]

Parameter Set: FromMonitorName
Get-SCOMMonitor -Name <String[]> [-ComputerName <String[]> ] [-Credential <PSCredential> ] [-SCSession <Connection[]> ] [ <CommonParameters>]




Detailed Description

The Get-SCOMMonitor cmdlet retrieves monitors in System Center 2012 – Operations Manager. In Operations Manager, monitors define logic for determining the health of an object.

Parameters

-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

localhost

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Credential<PSCredential>

Specifies a PSCredential object for the computer or computers that the ComputerName parameter specifies. The management group connection runs under this credential. 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

-DisplayName<String[]>

Specifies an array of display name objects. Values of the DisplayName parameter may vary depending on which localized management packs a user imports into the management group and the locale of the user who is running Windows PowerShell.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

true

-Id<Guid[]>

Specifies an array of unique identifiers for monitors.

The SCOMMonitor object stores the GUID in the Id property of the object. For more information, type "Get-SCOMMonitor | Format-Table DisplayName, Id".


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Instance<EnterpriseManagementObject[]>

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?

true

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 an unsealed management pack contains the monitor, save the override in the same management pack. For information about how to get a management pack object, type "Get-Help Get-SCOMManagementPack".


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Name<String[]>

Specifies an array of names of an object.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

true

-Recurse

Indicates that the cmdlet searches recursively.


Aliases

none

Required?

false

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

-Target<ManagementPackClass[]>

Specifies an array of monitors for one or more target 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

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

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 monitor by using a name

This command retrieves all monitors whose names begin with the string "System.Health".


PS C:\> Get-SCOMMonitor -Name "System.Health*"

Example 2: Retrieve a monitor by using a display name

This command retrieves all monitors whose display names contain the string "Performance".


PS C:\> Get-SCOMMonitor -DisplayName "*Performance*"

Example 3: Retrieve monitors for a management pack

This command retrieves the management pack that has the display name of System Center Core Library, and then passes the management pack object to the Get-SCOMMonitor cmdlet by using the pipeline operator (|). The Get-SCOMMonitor cmdlet gets all monitors for the management pack object.


PS C:\> Get-SCOMManagementPack -DisplayName "System Center Core Library" | Get-SCOMMonitor

Example 4: Retrieve monitors from a management pack

This example retrieves monitors in a management pack.

The first command gets the path to a management pack file and stores the value in the variable named $MPFile.

The second command uses the Get-SCOMMonitor cmdlet with the ManagementPack parameter to get the monitors from the management pack.


PS C:\> $MPFile = "C:\Program Files\System Center Operations Manager 2007\Microsoft.SystemCenter.2007.mp"
PS C:\> Get-SCOMMonitor -ManagementPack $MPFile

Example 5: Retrieve monitors by display name

This example retrieves monitors by display name.

The first command gets all classes that contain "health" in their display names, and then uses the pipeline operator (|) to pass the class objects to the Get-SCOMClassInstance cmdlet. The Get-SCOMClassInstance cmdlet gets the instance for each class, and then stores the results in the $Instances variable.

The second command gets the monitors for the class instances stored in the $Instances variable.


PS C:\> $Instances = Get-SCOMClass -DisplayName "*health*" | Get-SCOMClassInstance
PS C:\> Get-SCOMMonitor -Instance $Instances

Example 6: Retrieve monitors by using a target class

This example retrieves monitors by using a target class.

This command gets the monitors that have target classes that include "health" in their display names.


PS C:\> Get-SCOMMonitor -Target (Get-SCOMClass -DisplayName *health*)

Example 7: Retrieve a monitor by using an ID

This command retrieves the monitor that has the ID 7413b06b-a95b-4ae3-98f2-dac9ff76dabd.


PS C:\> Get-SCOMMonitor -Id 7413b06b-a95b-4ae3-98f2-dac9ff76dabd

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft