Get-CMStatusMessageQuery

Get-CMStatusMessageQuery

Gets Configuration Manager status message queries or displays messages.

Syntax

Parameter Set: SearchByName
Get-CMStatusMessageQuery [-Name <String> ] [-ShowMessages] [ <CommonParameters>]

Parameter Set: SearchByIdMandatory
Get-CMStatusMessageQuery -Id <String> [-ShowMessages] [ <CommonParameters>]

Detailed Description

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

Parameters

-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

-Name<String>

Specifies a name of a status message query.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ShowMessages

Indicates that the cmdlet shows messages. This cmdlet opens the Status Message Viewer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

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: Get a query that has a specified name

This command gets a query that has a specified name.

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

Example 2: Show messages for a query

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

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

New-CMStatusMessageQuery

Remove-CMStatusMessageQuery

Set-CMStatusMessageQuery