Remove-CMStatusMessageQuery

Removes a Configuration Manager status message query.

Syntax

Remove-CMStatusMessageQuery
      [-Confirm]
      [-DisableWildcardHandling]
      [-Force]
      [-ForceWildcardHandling]
      -Id <String>
      [-WhatIf]
      [<CommonParameters>]
Remove-CMStatusMessageQuery [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -InputObject  [-WhatIf] []
Remove-CMStatusMessageQuery [-Confirm] [-DisableWildcardHandling] [-Force] [-ForceWildcardHandling]
 -Name  [-WhatIf] []

Description

The Remove-CMStatusMessageQuery cmdlet removes a status message query from Microsoft System Center Configuration Manager. Status message queries return status messages from the System Center Configuration Manager site database.

Examples

Example 1: Remove a named query

PS C:\> Remove-CMStatusMessageQuery -Name "All Audit Status Messages from a Specific Site"
Remove
Are you sure you wish to remove StatusMessageQuery: Name="All Audit Status Messages from a Specific Site"?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

This command removes a query named All Audit Status Messages from a Specific Site. The command does not include the Force parameter, so the cmdlet prompts you before it removes the query.

Example 2: Remove a query that has a specified ID

PS C:\> Remove-CMStatusMessageQuery -Id "CM100008" -Force

This command removes the query that has an ID of CM100008. The command includes the Force parameter, so the cmdlet does not prompt you for confirmation.

Required Parameters

-Id

Specifies an ID of a status message query.

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

Specifies a status message query object. To obtain a status message query object, use the Get-CMStatusMessageQuery cmdlet.

Type:IResultObject
Required:True
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
Accept wildcard characters:False
-Name

Specifies a name of a status message query.

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

Optional Parameters

-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
-Force

Forces the command to run without asking for user confirmation.

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
-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