Clear-CMComponentStatusMessageCount

Clear-CMComponentStatusMessageCount

Changes the component status message count to zero.

Syntax

Parameter Set: SearchByName
Clear-CMComponentStatusMessageCount -ComponentName <String> -Severity <Severity> {All | Error | Information | Warning} -SiteCode <String> [-ComputerName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Clear-CMComponentStatusMessageCount cmdlet changes the component status message count to zero (0).

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, identified by site codes.

You can define which message count to set to zero by the component that created the messages, severity of the messages, and the site code of the Configuration Manager server that receives the messages. You can also specify the computer that hosts that component.

Parameters

-ComponentName<String>

Specifies the name of a component that creates messages.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies the name of a computer that hosts the component.

Aliases

MachineName

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Severity<Severity>

Specifies the severity of a component status message. The acceptable values for this parameter are:

-- All
-- Error
-- Information
-- Warning

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SiteCode<String>

Specifies the site code for a Configuration Manager site. Status messages originate in this site.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

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: Clear message count

This command changes the message count to zero for the component SMS_HIERARCHY_MANAGER for all message severity types. The command specifies the site that has the site code CM1.

PS C:\> Clear-CMComponentStatusMessageCount -ComponentName "SMS_HIERARCHY_MANAGER" -Severity All -SiteCode "CM1"

Example 2: Clear error message count

This command changes the message count to zero for the component SMS_DISTRIBUTION_MANAGER for error messages. The command specifies the site that has the site code CM1, and includes the computer name West34.Western.Contoso.com.

PS C:\> Clear-CMComponentStatusMessageCount -ComponentName "SMS_DISTRIBUTION_MANAGER" -Severity Error -SiteCode "CM1" -ComputerName "West34.Western.Contoso.com"

Get-CMComponentStatusMessage