Get-CMStatusMessageQuery

Gets Configuration Manager status message queries or displays messages.

Syntax

Get-CMStatusMessageQuery
   [-Name <String>]
   [-ShowMessage]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]
Get-CMStatusMessageQuery
   -Id <String>
   [-ShowMessage]
   [-PassThru]
   [-DisableWildcardHandling]
   [-ForceWildcardHandling]
   [<CommonParameters>]

Description

The Get-CMStatusMessageQuery cmdlet gets Microsoft System Center Configuration Manager status message queries. Status message queries return status messages from a System Center Configuration Manager site database. You can use this cmdlet with the ShowMessages parameter to display messages found by this query.

You can use this cmdlet to get queries to use with the Set-CMStatusMessageQuery cmdlet or the Remove-CMStatusMessageQuery cmdlet.

Examples

Example 1: Get a query that has a specified name

PS C:\> Get-CMStatusMessageQuery -Name "Clients That Received a Specific Deployed Program"

This command gets a query that has a specified name.

Example 2: Show messages for a query

PS C:\> Get-CMStatusMessageQuery -Id "SMS551" -ShowMessages

This command shows messages found by a query that has an ID of SMS551.

Parameters

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

Specifies an ID of a status message query.

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

Specifies a name of a status message query.

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

Returns the current working object. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ShowMessage
Type:SwitchParameter
Aliases:ShowMessages
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False