In this guide, I will cover 2 ways to export SCCM task sequence. You can export task sequence either from the ConfigMgr console or use PowerShell cmdlet Export-CMTaskSequence.
When you export SCCM task sequence, you export all the dependencies associated with that task sequence. Task sequence references are also known as related objects that are part of the task sequence.
Task sequences help you to automate steps in your Configuration Manager environment. You can deploy an OS image to a destination computer, build and capture an OS image from a set of OS installation files, and capture and restore user state information.
If you want to backup your Task Sequences, you can simply export them to a .zip file. If the task sequence gets deleted or modified, you can import the exported task sequence into SCCM.
Another way to backup your Task sequences is to use the duplicate TS or copy TS option. When you duplicate the task sequence, it creates a copy of original task sequence allowing to edit and make changes freely.
After you create a new task sequence, you can export the task sequence from the SCCM console. Even the existing task sequences can be exported to a .zip file, and later you can import it back in Configuration Manager. The Task sequences are located in the ConfigMgr console.
Ways to Export Task Sequence in SCCM
There are two ways to export a task sequence in SCCM:
- You can export a task sequence either from the ConfigMgr console
- Export SCCM task sequence using PowerShell cmdlet Export-CMTaskSequence.
Benefits of Exporting ConfigMgr Task Sequence?
What is the benefit of exporting a SCCM task sequence? An exported task sequences can save a lot of time for admins. You don’t have to create a new task sequence from scratch, and simply import the existing task sequence and edit or modify it and deploy it.
After you export task sequence, you can either import an exported task sequence in same SCCM environment or import it in different ConfigMgr setup. The exported task sequence file is a .zip format file and there is no option to export task sequence to Excel file.
An exported ConfigMgr task sequence can be an advantage in situations when the original task sequence has been deleted accidentally. Instead of spending time in building a new task sequence, you can quickly import a task sequence in SCCM. In case the task sequence has been deleted accidentally or intentionally, you can find who deleted the task sequence.
You can export SCCM task sequence even when the task sequence is disabled. When you have tasks sequences that aren’t in use, you can disable the SCCM task sequence. However, in order for operating system deployment to work correctly, the task sequence should be enabled first.
What are Task Sequence References in SCCM?
Task Sequence dependencies are the packages, applications, or OS images that need to be available on the local Distribution Point to start operating system deployment.
Task sequence references in SCCM can include the following objects:
- Operating system images – For example, Windows 10, Windows 11.
- Boot images – This could be either default boot images or custom boot images like Dell boot image.
- Client Installation Package – The package that install the ConfigMgr client during OSD.
- Driver packages – The driver packages that contain the drivers for different laptop models.
- Applications and Packages – The applications that you intend to install along with the operating system.
- Task sequences referenced with the Run task sequence step – A run task sequence step includes the other task sequence that you can add to the main task sequence.
Check SCCM Task Sequence Dependencies
Before we see how to export SCCM Task Sequence, let’s look at the steps to find the task sequence dependencies via SCCM console:
- Launch the Configuration Manager console.
- Go to Software Library\Overview\Operating Systems\Task Sequences.
- Select a Task Sequence from the list and now click References tab in the bottom section.
- The references tab shows all the dependencies for the selected task sequence.
An upgrade operating system task sequence may have just one reference, whereas other task sequences can have multiple references. Some examples of Task Sequence dependencies are the packages, applications, or OS images that need to be available on the local Distribution Point to start operating system deployment.
Method 1 – Export Task Sequence using SCCM Console
You can export task sequence using SCCM console with following steps:
- Launch the SCCM console.
- Go to Software Library\Overview\Operating Systems\Task Sequences.
- From the list of Task Sequences, right-click the Task Sequence that you want to export and select the Export option.
- You may select multiple task sequences and export all of them into a single file using Export option.
You should now see the Export Task Sequence wizard. On the General tab, you must specify where to save the selected task sequences and export options.
- File – Click Browse and specify the file name and location for task sequence that you’re going to export.
- Export all task sequence dependencies – Enable this option to export all the dependencies associated with the task sequence.
- Export all the content for the selected task sequences and dependencies – Enable this option to export the content associated with the tasks sequence and its dependencies.
- Administrator Comments – Adding the comments is optional but may add a brief description to let other admins know the reason for exporting the task sequence.
Click Next to continue.
On the Review Related objects page, take a look at all the related objects associated with the SCCM task sequence. Click Next.
On the Summary window, confirm the task sequence export settings. Click Next.
The task “export task sequence wizard” completed successfully confirms the task sequence has been exported. Close the Export task sequence wizard.
Method 2 – Export SCCM Task Sequence using PowerShell Command
You can use the PowerShell cmdlet Export-CMTaskSequence to export a task sequence in SCCM. Launch the Configuration Manager console and from the console, select Connect via Windows PowerShell option.
In the PowerShell window, enter the following command to export task sequence.
Get-CMTaskSequence -Name "Upgrade Operating System" | Export-CMTaskSequence -ExportFilePath "\\corpcm\sources\ExportTS.zip"
The above PowerShell command gets the task sequence object named “Upgrade Operating System” and uses the pipeline operator to pass the object to Export-CMTaskSequence, which exports the task sequence object to the specified location.
There are two important parameters that you can use while exporting the task sequence with PowerShell.
-WithContent– Set this parameter to $true to export all content for the task sequence and dependencies.
-WithDependence– Set this parameter to $true to export all task sequence dependencies.
Running the above PowerShell command will export SCCM task sequence into a .zip file. The exported task sequence zip file contains all the task sequence references and objects.
You can use get-cmtasksequence cmdlet to get a Configuration Manager task sequence. Next step, you can use the Import-CMTaskSequence cmdlet to import a task sequence to another site.