Get-CMStatusMessageQuery

Gets Configuration Manager status message queries or displays messages.

Syntax

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

Description

The Get-CMStatusMessageQuery cmdlet gets Configuration Manager status message queries. Status message queries return status messages from a 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.

Note

Run Configuration Manager cmdlets from the Configuration Manager site drive, for example PS XYZ:\>. For more information, see getting started.

Examples

Example 1: Get a query that has a specified name

PS XYZ:\> 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 XYZ:\> Get-CMStatusMessageQuery -Id "SMS551" -ShowMessages

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

Parameters

-DisableWildcardHandling

This parameter treats wildcard characters as literal character values. You can't combine it with ForceWildcardHandling.

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

-ForceWildcardHandling

This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies a name of a status message query.

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

-PassThru

Add this parameter to return an object that represents the item with which you're working. By default, this cmdlet may not generate any output.

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

-ShowMessage

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

Inputs

None

Outputs

IResultObject[]

IResultObject