Export (0) Print
Expand All
Expand Minimize

Remove-CMStatusMessageQuery

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Remove-CMStatusMessageQuery

Removes a Configuration Manager status message query.

Syntax

Parameter Set: SearchByIdMandatory
Remove-CMStatusMessageQuery -Id <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Remove-CMStatusMessageQuery -Name <String> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMStatusMessageQuery -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

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

Parameters

-Force

Performs the action without a confirmation message.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Id<String>

Specifies an ID of a status message query.


Aliases

QueryId

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-InputObject<IResultObject>

Specifies a status message query object. To obtain a status message query object, use the Get-CMStatusMessageQuery 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 status message query.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

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

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.


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"):

Example 2: Remove a query that has a specified ID

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.


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

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft