Set-CMStatusMessageQuery
Set-CMStatusMessageQuery
Changes settings or security scope or deletes messages for a Configuration Manager status message query.
構文
Parameter Set: DeleteMessageByIdMandatory
Set-CMStatusMessageQuery -DeleteMessage -Id <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: DeleteMessageByNameMandatory
Set-CMStatusMessageQuery -DeleteMessage -Name <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: DeleteMessageByObjectMandatory
Set-CMStatusMessageQuery -DeleteMessage -InputObject <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeById
Set-CMStatusMessageQuery -Id <String> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeByName
Set-CMStatusMessageQuery -Name <String> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetSecurityScopeByValue
Set-CMStatusMessageQuery -InputObject <IResultObject> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetStatusMessageQueryByIdMandatory
Set-CMStatusMessageQuery -Id <String> [-Comments <String> ] [-Expression <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetStatusMessageQueryByNameMondatory
Set-CMStatusMessageQuery -Name <String> [-Comments <String> ] [-Expression <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SetStatusMessageQueryByObjectMondatory
Set-CMStatusMessageQuery -InputObject <IResultObject> [-Comments <String> ] [-Expression <String> ] [-NewName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Set-CMStatusMessageQuery cmdlet changes settings for a Microsoft System Center 2012 Configuration Manager status message query. Status message queries return status messages from a System Center 2012 Configuration Manager site database. You can modify a comment, a Windows Management Infrastructure (WMI) expression, or the name of a query.
You can use this cmdlet with the DeleteMessage parameter to delete messages that this query finds.
This cmdlet can also add or remove a security scope for a message query. Every status message query must belong to at least one security scope. For more information about security scopes, see Planning for Security in Configuration Manager (https://go.microsoft.com/fwlink/?LinkId=268426) on TechNet.
You can specify a name or ID for a query or use the Get-CMStatusMessageQuery cmdlet to obtain a query.
パラメーター
-Comments<String>
Specifies a comment for a query.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-DeleteMessage
Indicates that messages found by this query are deleted from the Configuration Manager database.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Expression<String>
Specifies an expression in WMI Query Language (WQL).
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Id<String>
Specifies an ID for a status message query.
エイリアス |
QueryId |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-InputObject<IResultObject>
Specifies a status message query object. To obtain a status message query object, use the Get-CMStatusMessageQuery cmdlet.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies a name for a status message query.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-NewName<String>
Specifies a new name for a query.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SecurityScopeAction<SecurityScopeActionType>
Specifies an action for a security scope. Valid values are: AddMembership and RemoveMembership.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SecurityScopeName<String>
Specifies the name of a security scope. A security scope name can be Default or the name of a custom security scope.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Confirm
コマンドレットを実行する前に、ユーザーに確認を求めます。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
-WhatIf
コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。
必須? |
false |
位置は? |
named |
既定値 |
false |
パイプライン入力を許可する |
false |
ワイルドカード文字を許可する |
false |
<CommonParameters>
このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。
入力
入力型は、コマンドレットにパイプできるオブジェクトの型です。
出力
出力型は、コマンドレットによって生成されるオブジェクトの型です。
例
Example 1: Add a security scope
This command adds the security scope named Scope22 to the query named All Status Messages.
PS C:\> Set-CMStatusMessageQuery -Name "All Status Messages" -SecurityScopeAction AddMembership -SecurityScopeName "Scope22"
Example 2: Delete messages
This command removes messages found by the query named All Active Directory Security Groups from the System Center 2012 Configuration Manager database.
PS C:\> Set-CMStatusMessageQuery -DeleteMessage -Name "All Active Directory Security Groups"
Example 3: Rename a query
This command renames the query All Active Directory Security Groups. The new name of the query is Western Security Groups.
PS C:\> Set-CMStatusMessageQuery -Name "All Active Directory Security Groups" -NewName "Western Security Groups"