New-CMStatusFilterRule

Creates a rule in Configuration Manager.

Syntax

New-CMStatusFilterRule
   [-AllowDeleteAfterDays <Int32>]
   [-ComponentName <String>]
   [-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>]
   [-WriteToDatabase <Boolean>]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

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

Note

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

Examples

Example 1: Create a status filter rule

This command creates a status filter rule at the XYZ site to detect status message 4611 and write an event in the Windows log.

New-CMStatusFilterRule -SiteCode "XYZ" -Name "Detect when the component status summarizer resets the status of a component." -Source "Site Server" -ComponentName "SMS_COMPONENT_STATUS_SUMMARIZER" -MessageId "4611" -ReportToEventLog $True -ReplicateToParentSite $False -RunProgram $False -ForwardToStatusSummarizer $True -ProcessLowerPriorityRule $True

Parameters

-AllowDeleteAfterDays

Type:Int32
Aliases:AllowUserDeleteMessagesAfterThresholdDays
Position:Named
Default value:None
Required:False
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
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

-ForwardToStatusSummarizer

Indicates whether to forward to the status summarizer.

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

-MessageId

Specifies a message ID in Configuration Manager.

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

-MessageType

Specifies a status message type in Configuration Manager.

Type:MessageType
Accepted values:None, Milestone, Detail, Audit
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies a name for the status filter rule.

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

-PropertyId

Specifies a property ID in Configuration Manager.

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

-PropertyValue

Specifies a value for the corresponding PropertyId parameter.

Type:String
Position:Named
Default value:None
Required:False
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
Required:False
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
Accepted values:Low, Medium, High
Position:Named
Default value:None
Required:False
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
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SeverityType

Specifies the severity of a status message.

Type:SeverityType
Accepted values:None, Informational, Warning, Error
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SiteCode

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

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

-SiteSystemServerName

Specifies a name of the site system server.

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

-Source

Specifies the status message source to match.

Type:String
Position:Named
Default value:None
Required:False
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
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

-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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

IResultObject