Export (0) Print
Expand All
Expand Minimize

Remove-CMTaskSequence

Updated: February 7, 2014

Applies To: System Center 2012 R2 Configuration Manager

Remove-CMTaskSequence

Removes a Configuration Manager task sequence.

Syntax

Parameter Set: SearchByIdMandatory
Remove-CMTaskSequence -TaskSequencePackageId <String[]> [-Force] [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByNameMandatory
Remove-CMTaskSequence -Name <String> [-Force] [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Remove-CMTaskSequence -InputObject <IResultObject> [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Remove-CMTaskSequence cmdlet removes 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.

You can specify a name or ID to remove a specific sequence or use the Get-CMTaskSequence cmdlet to obtain a sequence. To remove a sequence only if it has a particular security scope, you can specify a security scope along with a name or ID.

This cmdlet removes a sequence permanently. Use the Disable-CMTaskSequence cmdlet to stop advertising a task sequence to clients temporarily.

Parameters

-Force

Performs the action without a confirmation message.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-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 for 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 executing the command.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


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.

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: Remove a task sequence by using a variable

The first command gets the task sequence object that has the specified name and stores it in the $CMTS variable.

The second command removes the object stored in $CMTS.


PS C:\> $CMTS = Get-CMTaskSequence -Name "General Sequence 11"
PS C:\> Remove-CMTaskSequence -InputObject $CMTS
Remove
Are you sure you wish to remove TaskSequence: Name="General Sequence 11"?
[Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):

Example 2: Remove a specified task sequence

This command removes the task sequence object that has the specified ID. This command uses the Force parameter, so the cmdlet does not prompt you for confirmation.


PS C:\> Remove-CMTaskSequence -Id "CM10000A" -Force

Related topics

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft