Get-CMStatusMessageQuery

Gets Configuration Manager status message queries or displays messages.

Syntax

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

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.

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

Optional Parameters

-DisableWildcardHandling

Indicates that wildcard handling is disabled.

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

Specifies a name of a status message query.

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

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

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