Export-CMTaskSequence
Syntax
Export-CMTaskSequence
-Name <String>
-ExportFilePath <String>
[-WithDependence <Boolean>]
[-WithContent <Boolean>]
[-Comment <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Export-CMTaskSequence
-InputObject <IResultObject>
-ExportFilePath <String>
[-WithDependence <Boolean>]
[-WithContent <Boolean>]
[-Comment <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Export-CMTaskSequence
-TaskSequencePackageId <String>
-ExportFilePath <String>
[-WithDependence <Boolean>]
[-WithContent <Boolean>]
[-Comment <String>]
[-DisableWildcardHandling]
[-ForceWildcardHandling]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Export-CMTaskSequence cmdlet exports a Microsoft System Center Configuration Manager task sequence to a .zip file.
Examples
Example 1: Get a task sequence and export it
PS C:\> $TaskSequence = Get-CMTaskSequence -Name "TaskSequence01"
PS C:\> Export-CMTaskSequence -InputObject $TaskSequence -ExportFilePath "\\Server1\TS\TaskSequence01.zip"
The first command gets the task sequence object named TaskSequence01 and stores the object in the $TaskSequence variable.
The second command exports the task sequence stored in $TaskSequence to the specified location.
Example 2: Get a task sequence and use the pipeline to export it
PS C:\> Get-CMTaskSequence -Name "TaskSequence02" | Export-CMTaskSequence -ExportFilePath "\\Server1\TS\TaskSequence02.zip"
This command gets the task sequence object named TaskSequence02 and uses the pipeline operator to pass the object to Export-CMTaskSequence, which exports the task sequence object to the specified location.
Required Parameters
Specifies a path for the exported .zip file.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a task sequence object. To obtain a task sequence object, use the Get-CMTaskSequence cmdlet.
Type: | IResultObject |
Position: | Named |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Specifies a name for the task sequence.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the ID of a task sequence.
Type: | String |
Aliases: | PackageId, Id |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Optional Parameters
Specifies a comment for the task sequence.
Type: | String |
Aliases: | Comments |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
DisableWildcardHandling treats wildcard characters as literal character values. Cannot be combined with ForceWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
ForceWildcardHandling processes wildcard characters and may lead to unexpected behavior (not recommended). Cannot be combined with DisableWildcardHandling.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates whether to include content associated with the task sequence in the export .zip file.
If you specify a value of $True, the cmdlet copies the content from the package source to the export location, and uses the import path as the new package source location.
Type: | Boolean |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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.
Type: | Boolean |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |