Export-CMTaskSequence

Export-CMTaskSequence

Exports a Configuration Manager task sequence.

Syntax

Parameter Set: SearchPackageByNameMandatory
Export-CMTaskSequence -ExportFilePath <String> -Name <String> [-Comments <String> ] [-WithContent <Boolean> ] [-WithDependence <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchByValueMandatory
Export-CMTaskSequence -ExportFilePath <String> -InputObject <IResultObject> [-Comments <String> ] [-WithContent <Boolean> ] [-WithDependence <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: SearchPackageByIdMandatory
Export-CMTaskSequence -ExportFilePath <String> -TaskSequencePackageId <String[]> [-Comments <String> ] [-WithContent <Boolean> ] [-WithDependence <Boolean> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Export-CMTaskSequence cmdlet exports a Microsoft System Center 2012 SP1 Configuration Manager task sequence to a .zip file.

Parameters

-Comments<String>

Specifies a comment in Configuration Manager.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-ExportFilePath<String>

Specifies the path of the exported .zip file in Configuration Manager.

Aliases

none

Required?

true

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 the task sequence in Configuration Manager.

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

-WithContent<Boolean>

Indicates whether to include content associated with the task sequence in the export .zip file. If you specify a value for $True, the cmdlet copies the content from the package source to the export location, and the Import Task Sequence Wizard uses the import path as the new package source location.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-WithDependence<Boolean>

Indicates whether to include dependencies in the export .zip file. Specify a value of $True to scan for all the related objects and export them with the task sequence that includes any dependencies for applications. To export only the task sequence XML without the other referenced objects, set this parameter to $False.

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: Export a task sequence to a file

This command exports a sequence of tasks to a file and specifies an export file path.

PS C:\> Export-CMTaskSequence -Name "Task Sequence 1210" -ExportFilePath "\\Contoso-01\Users\AimeeLott\Desktop\TaskSequence.zip"

Disable-CMTaskSequence

Enable-CMTaskSequence

Get-CMTaskSequence

Import-CMTaskSequence

Remove-CMTaskSequence

Set-CMTaskSequence