Set-CMTaskSequence

Set-CMTaskSequence

Modifies a Configuration Manager task sequence.

Syntax

Parameter Set: SetById
Set-CMTaskSequence -TaskSequenceId <String> [-BootImageId <String> ] [-Category <String> ] [-CustomText <String> ] [-DeploymentPackageId <String> ] [-Description <String> ] [-DisableTaskSequence <Boolean> ] [-Duration <Int64> ] [-NewName <String> ] [-ProgramName <String> ] [-RunAnotherProgram <Boolean> ] [-RunEveryTime <Boolean> ] [-SuppressNotification <Boolean> ] [-UseBootImage <Boolean> ] [-UseDefaultText <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetByValue
Set-CMTaskSequence -TaskSequence <IResultObject> [-BootImageId <String> ] [-Category <String> ] [-CustomText <String> ] [-DeploymentPackageId <String> ] [-Description <String> ] [-DisableTaskSequence <Boolean> ] [-Duration <Int64> ] [-NewName <String> ] [-ProgramName <String> ] [-RunAnotherProgram <Boolean> ] [-RunEveryTime <Boolean> ] [-SuppressNotification <Boolean> ] [-UseBootImage <Boolean> ] [-UseDefaultText <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetSecurityScopeById
Set-CMTaskSequence -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> -TaskSequencePackageId <String[]> [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetSecurityScopeByName
Set-CMTaskSequence -Name <String> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-SecuredScopeNames <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SetSecurityScopeByValue
Set-CMTaskSequence -InputObject <IResultObject> -SecurityScopeAction <SecurityScopeActionType> {AddMembership | RemoveMembership} -SecurityScopeName <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Set-CMTaskSequence cmdlet modifies a Microsoft System Center 2012 SP1 Configuration Manager task sequence. A task sequence includes configuration and operating system deployment settings for a System Center 2012 Configuration Manager client computer.

To modify security scopes, specify a name or ID for a sequence or use the Get-CMTaskSequence cmdlet to obtain a sequence. To change a sequence that has a particular security scope, you can specify a security scope along with a name or ID.

To modify other settings, specify an ID or use the Get-CMTaskSequence cmdlet to obtain a sequence.

Parameters

-BootImageId<String>

Specifies the ID of a boot image that the task sequence references.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Category<String>

Specifies a category, as a string, for the task sequence. You can use categories to group task sequences.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-CustomText<String>

Specifies custom text for the task sequence. Custom text appears in the progress notification dialog box while the task sequence runs. The text cannot exceed 50 characters.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DeploymentPackageId<String>

Specifies the ID of a package. If you specify a value of $True for the RunAnotherProgram parameter, the specified package runs before the task sequence runs.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Description<String>

Specifies a description for the task sequence.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-DisableTaskSequence<Boolean>

Indicates whether to disable this task sequence.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Duration<Int64>

Specifies the duration of this task sequence.

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 Get-CMTaskSequence.

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

-NewName<String>

Specifies a new name for the task sequence.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ProgramName<String>

Specifies the name of a program to run from a Configuration Manager software package specified by the DeploymentPackageId parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RunAnotherProgram<Boolean>

Indicates whether to run another program before running the task sequence. Specify the program by using the DeploymentPackageId parameter and the ProgramName parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-RunEveryTime<Boolean>

Indicates whether the program specified in the ProgramName parameter runs every time that the task sequence runs. If you specify a value of $False, the program does not run if it has run successfully in the past.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecuredScopeNames<String>

Specifies a name of a security scope. This parameter refers to the security scopes that a task sequence already belongs to, not a new scope to add.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SecurityScopeAction<SecurityScopeActionType>

Specifies an action for a security scope. The acceptable values for this parameter are: AddMembership and RemoveMembership.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

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.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-SuppressNotification<Boolean>

Indicates whether to suppress notifications for this task sequence.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TaskSequence<IResultObject>

Specifies a task sequence object. To obtain a task sequence object, use Get-CMTaskSequence.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-TaskSequenceId<String>

Specifies the ID of a task sequence.

Aliases

none

Required?

true

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

-UseBootImage<Boolean>

Indicates whether the task sequence uses the boot image specified by using the BootImageID parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-UseDefaultText<Boolean>

Indicates whether to use default text in the progress notification dialog box while the task sequence runs. If you select a value of $False for this parameter, be sure to specify custom text by using the CustomText parameter.

Aliases

none

Required?

false

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: Add a security scope to a task sequence

This command adds the specified security scope to the task sequence named General Sequence 22.

PS C:\> Set-CMTaskSequence -Name "General Sequence 22" -SecurityScopeAction AddMembership -SecurityScopeName "Scope05"

Disable-CMTaskSequence

Enable-CMTaskSequence

Export-CMTaskSequence

Get-CMTaskSequence

Import-CMTaskSequence

New-CMTaskSequence

Remove-CMTaskSequence