Clear-CMComponentStatusMessageCount

Changes the component status message count to zero.

Syntax

Clear-CMComponentStatusMessageCount
     -ComponentName <String>
     [-ComputerName <String>]
     [-Confirm]
     [-DisableWildcardHandling]
     [-ForceWildcardHandling]
     -Severity <Severity>
     [-SiteCode <String>]
     [-WhatIf]
     [<CommonParameters>]

Description

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

Microsoft System Center 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.

Examples

Example 1: Clear message count

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

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.

Example 2: Clear error message count

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

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.

Required Parameters

-ComponentName

Specifies the name of a component that creates messages.

Type:String
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Severity

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

  • Error
  • Information
  • Warning
Type:Severity
Parameter Sets:All, Error, Warning, Information
Required:True
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ComputerName

Specifies the name of a computer that hosts the component.

Type:String
Aliases:MachineName
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DisableWildcardHandling

Indicates that wildcard handling is disabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ForceWildcardHandling

Indicates that wildcard handling is enabled.

Type:SwitchParameter
Required:False
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteCode

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

Type:String
Required:False
Position:Named
Default value:None
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False