Remove-CMStatusFilterRule
Remove-CMStatusFilterRule
Removes a specified Configuration Manager filter rule for status messages.
Syntax
Parameter Set: SearchBySiteCodeMandatory
Remove-CMStatusFilterRule -Name <String> -SiteCode <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByValue
Remove-CMStatusFilterRule -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-CMStatusFilterRule cmdlet removes a specified Microsoft System Center 2012 SP1 Configuration Manager filter rule for status messages.
Status filter rules specify how System Center 2012 Configuration Manager responds to status messages. Each filter rule contains criteria and actions for status messages. You configure status filter rules for each site, not across all sites.
Use the rule name and site code to specify a rule to remove. This cmdlet deletes rules permanently. You can use the Disable-CMStatusFilterRule cmdlet to suspend a rule.
Parameters
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<IResultObject>
Specifies a status filter rule object to remove. To obtain a status filter rule object, use the Get-CMStatusFilterRule cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name of a rule.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SiteCode<String>
Specifies a site code for the Configuration Manager 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: Remove a rule
This command removes a status filter rule that has the specified name in a site that has the site code CM1. The command includes the Force parameter, so the cmdlet does not prompt you for confirmation.
PS C:\> Remove-CMStatusFilterRule -Name "Status change to critical" -SiteCode "CM1" -Force