Get-CMComponentStatusMessage

Get-CMComponentStatusMessage

Gets component status messages in Configuration Manager.

Syntax

Parameter Set: SearchByName
Get-CMComponentStatusMessage -ViewingPeriod <DateTime> [-ComponentName <String> ] [-ComputerName <String> ] [-Severity <Severity> {All | Error | Information | Warning} ] [-SiteCode <String> ] [ <CommonParameters>]

Detailed Description

The Get-CMComponentStatusMessage cmdlet gets component status messages for a specified period.

Microsoft System Center 2012 SP1 Configuration Manager indicates whether operations succeed or fail and include other information in component status messages. Threads or processes send component status messages to Configuration Manager sites, which are identified by site codes.

You can define which messages to get by the severity of the message, the component that created the message, the computer that hosts that component, or the Configuration Manager server that receives the message. You must specify a viewing period, as a TimeSpan object.

Parameters

-ComponentName<String>

Specifies the name of a thread or process. A thread or process sends a component status message.

Aliases

Component

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies the name of a computer. A computer hosts a component that sends a status message.

Aliases

MachineName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Severity<Severity>

Specifies the severity of status messages. The acceptable values for this parameter are:

-- ALL
-- Error
-- Information
-- Warning

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCode<String>

Specifies an array of a site codes for Configuration Manager sites.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ViewingPeriod<DateTime>

Specifies a DateTime object. To get a DateTime object, use the Get-Date cmdlet. For more information, type Get-Help Get-Date. The cmdlet limits component status messages to this time period.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

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: Get critical messages for a site

This command gets component status messages for the specified viewing period for the Configuration Manager site that has the site code CM1. The command gets only warning messages.

PS C:\> Get-CMComponentStatusMessage -ViewingPeriod "2/1/2013 12:00 AM" -Severity Warning -SiteCode "CM1"

Get-CMComponentStatusSetting