New-​CM​Status​Filter​Rule

Creates a rule in Configuration Manager.

Syntax

New-CMStatusFilterRule
   [-AllowDeleteAfterDays <Int32>]
   [-ComponentName <String>]
   [-Confirm]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-ForwardToStatusSummarizer <Boolean>]
   [-MessageId <Int32>]
   [-MessageType <MessageType>]
   -Name <String>
   [-ProcessLowerPriorityRule <Boolean>]
   [-ProgramPath <String>]
   [-PropertyId <String>]
   [-PropertyValue <String>]
   [-ReplicateToParentSite <Boolean>]
   [-ReplicationPriority <ReplicationPriority>]
   [-ReportToEventLog <Boolean>]
   [-RunProgram <Boolean>]
   [-SeverityType <SeverityType>]
   [-SiteCode <String>]
   [-SiteSystemServerName <String>]
   [-Source <String>]
   [-StatusFilterRuleSiteCode <String>]
   [-WhatIf]
   [-WriteToDatabase <Boolean>]
   [<CommonParameters>]

Description

The New-CMStatusFilterRule cmdlet creates a rule that triggers one or more actions that alerts an administrator to a specific message in Microsoft System Center Configuration Manager.

Examples

Example 1: Create a status filter rule

PS C:\> New-CMStatusFilterRule -SiteCode "Contoso2" -Name "11211" -TargetSiteCode "Contoso2" -Source "SMS Provider" -System "Contoso-test" -Component "1111" -MessageType Milestone -SeverityType Informational -MessageId "1234" -PropertyName "403" -PropertyValue "123" -WriteToDatabase $True -AllowDeleteMessagesTimeDays 20 -ReportToEventLog $False -ReplicateToParentSite $False -RunProgram $False -ForwardToStatusSummarizers $True -ProcessLowerPriorityRules $True

This command creates a status filter rule.

Required Parameters

-Name

Specifies a name for the status filter rule.

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

Optional Parameters

-AllowDeleteAfterDays
Type:Int32
Aliases:AllowUserDeleteMessagesAfterThresholdDays
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ComponentName

Specifies the Configuration Manager component that corresponds to the status messages.

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

DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.

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

ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.

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

Indicates whether to forward to the status summarizer.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MessageId

Specifies a message ID in Configuration Manager.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MessageType

Specifies a status message type in Configuration Manager. The acceptable values for this parameter are:- Audit

  • Detail
  • Milestone
  • None
Type:MessageType
Parameter Sets:None, Milestone, Detail, Audit
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProcessLowerPriorityRule

Indicates whether to process a lower priority rule, which prevents further rule processing.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ProgramPath

Specifies a path to a program that runs when a status message matches the status filter rule.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PropertyId

Specifies a property ID in Configuration Manager.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-PropertyValue

Specifies a value for the corresponding PropertyId parameter.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReplicateToParentSite

Indicates whether to pass a message to the parent site.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReplicationPriority

Specifies a replication priority for sending status messages to the parent site. The acceptable values for this parameter are: High, Low, and Medium.

Type:ReplicationPriority
Parameter Sets:Low, Medium, High
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ReportToEventLog

Indicates whether to report an event in the Windows event log.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-RunProgram

Indicates whether to run a program when a status message matches a filter rule.

Type:Boolean
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SeverityType

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

  • Informational
  • None
  • Warning
Type:SeverityType
Parameter Sets:None, Informational, Warning, Error
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteCode

Specifies a System Center Configuration Manager site code that defines the status rule.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SiteSystemServerName

Specifies a name of the site system server.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Source

Specifies the status message source to match.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-StatusFilterRuleSiteCode

Specifies a site code for the status filter rule.

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

Indicates whether to write a message to the database. Must be set to enable the AllowUserDeleteMessagesAfterThresholdDays parameter.

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