Get-CMStatusMessageQuery
Gets Configuration Manager status message queries or displays messages.
Syntax
SearchByName (Default)
Get-CMStatusMessageQuery
[-Name <String>]
[-PassThru]
[-ShowMessage]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[<CommonParameters>]
SearchByIdMandatory
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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ForceWildcardHandling
This parameter processes wildcard characters and may lead to unexpected behavior (not recommended). You can't combine it with DisableWildcardHandling.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Id
Specifies an ID of a status message query.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | QueryId |
Parameter sets
SearchByIdMandatory
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-Name
Specifies a name of a status message query.
Parameter properties
Type: | String |
Default value: | None |
Supports wildcards: | True |
DontShow: | False |
Parameter sets
SearchByName
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-ShowMessage
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.
Parameter properties
Type: | SwitchParameter |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Aliases: | ShowMessages |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.