Clear-CMComponentStatusMessageCount

Changes the component status message count to zero.

Syntax

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

Description

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

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.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Clear message count

PS XYZ:\>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 XYZ:\>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.

Parameters

-ComponentName

Specifies the name of a component that creates messages.

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

-ComputerName

Specifies the name of a computer that hosts the component.

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

-Confirm

Prompts you for confirmation before running the cmdlet.

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

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Accepted values:All, Error, Warning, Information
Position:Named
Default value:None
Required:True
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
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet doesn't run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

System.Object