Disable-CMTaskSequence
Disable-CMTaskSequence
Disables a Configuration Manager task sequence.
構文
Parameter Set: SearchByIdMandatory
Disable-CMTaskSequence -TaskSequencePackageId <String[]> [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByNameMandatory
Disable-CMTaskSequence -Name <String> [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: SearchByValueMandatory
Disable-CMTaskSequence -InputObject <IResultObject> [-Confirm] [-WhatIf] [ <CommonParameters>]
詳細説明
The Disable-CMTaskSequence cmdlet disables a Microsoft System Center 2012 Configuration Manager task sequence. A task sequence includes configuration and operating system deployment settings for a System Center 2012 Configuration Manager client computer. When you disable a task sequence, System Center 2012 Configuration Manager no longer advertises the sequence to clients.
You can specify a name or ID to disable a specific sequence or use the Get-CMTaskSequence cmdlet to obtain a sequence to disable. To disable a sequence only if it has a particular security scope, you can specify a security scope along with a name or ID.
You can use the Enable-CMTaskSequence cmdlet to enable a sequence later. To remove a task sequence completely, use the Remove-CMTaskSequence cmdlet.
パラメーター
-InputObject<IResultObject>
Specifies a task sequence object. To obtain a task sequence object, use the Get-CMTaskSequence cmdlet.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-Name<String>
Specifies a name of a task sequence.
エイリアス |
なし |
必須? |
true |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-SecuredScopeNames<String>
Specifies a name of a security scope.
エイリアス |
なし |
必須? |
false |
位置は? |
named |
既定値 |
なし |
パイプライン入力を許可する |
True (ByPropertyName) |
ワイルドカード文字を許可する |
false |
-TaskSequencePackageId<String[]>
Specifies an array of IDs of task sequences.
エイリアス |
PackageId |
必須? |
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: Disable a specific task sequence
This command disables a task sequence that has an ID of CM100008.
PS C:\> Disable-CMTaskSequence -Id "CM100008"
Example 2: Disable a task sequence by using a variable
The first command gets the task sequence that has an ID of CM100007 and stores it in the $CMTS variable.
The second command disables the task sequence stored in $CMTS.
PS C:\> $CMTS = Get-CMTaskSequence -Id CM100007
PS C:\> Disable-CMTaskSequence -InputObject $CMTS