Disable-CMTaskSequence
Disable-CMTaskSequence
Disables a Configuration Manager task sequence.
Syntax
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>]
Detailed Description
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.
Parameters
-InputObject<IResultObject>
Specifies a task sequence object. To obtain a task sequence object, use the Get-CMTaskSequence cmdlet.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Name<String>
Specifies a name of a task sequence.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SecuredScopeNames<String>
Specifies a name of a security scope.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-TaskSequencePackageId<String[]>
Specifies an array of IDs of task sequences.
Aliases |
PackageId |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
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: 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
This example disables a task sequence.
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