Export SCCM Task Sequence using Console and PowerShell

In this guide, I will cover 2 ways to export SCCM task sequence using ConfigMgr console and PowerShell. You can export a SCCM task sequence either from the ConfigMgr console or use PowerShell cmdlet Export-CMTaskSequence.

When you export a task sequence in ConfigMgr, 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.

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.

There are two ways to export a task sequence in SCCM. You can export a task sequence either from the ConfigMgr console or use a PowerShell cmdlet Export-CMTaskSequence. We will look at both these TS export methods in this guide.

What is the advantage of exporting a 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 SCCM task sequence, you can either import an exported task sequence in same SCCM environment or import it in different ConfigMgr setup.

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 you export ConfigMgr task sequence, let’s look at the steps 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.
Check SCCM Task Sequence Dependencies
Check SCCM Task Sequence Dependencies

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 SCCM Task Sequence using ConfigMgr Console

The easiest way to export SCCM task sequence is using ConfigMgr console.

  • Launch the Configuration Manager 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.
Export SCCM Task Sequence using ConfigMgr Console
Export SCCM Task Sequence using ConfigMgr Console

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.

  1. File – Click Browse and specify the file name and location for task sequence that you’re going to export.
  2. Export all task sequence dependencies – Enable this option to export all the dependencies associated with the task sequence.
  3. 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.
  4. 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.

Export SCCM Task Sequence using ConfigMgr Console
Export SCCM Task Sequence using ConfigMgr Console

On the Review Related objects page, take a look at all the related objects associated with the SCCM task sequence. Click Next.

SCCM Task Sequence Export Options
SCCM Task Sequence Export Options

On the Summary window, confirm the task sequence export settings. Click Next.

Task Sequence Export Summary
Task Sequence Export Summary

The task “export task sequence wizard” completed successfully confirms the task sequence has been exported. Close the Export task sequence wizard.

Task Sequence Export Successful
Task Sequence Export Successful

Method 2 – Export SCCM Task Sequence using Export-CMTaskSequence

You can use the PowerShell cmdlet Export-CMTaskSequence to export a task sequence in SCCM. To achieve that, from the SCCM console, use Connect via Windows PowerShell option.

 Export SCCM Task Sequence using PowerShell cmdlet Export-CMTaskSequence
Export SCCM Task Sequence using PowerShell cmdlet Export-CMTaskSequence

In the Windows PowerShell windows, enter the following command to export the task sequence.

Get-CMTaskSequence -Name "Upgrade Operating System" | Export-CMTaskSequence -ExportFilePath "\\corpcm\sources\ExportTS.zip"

This 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 exports the SCCM task sequence into a .zip file. The exported task sequence zip file contains all the task sequence references and objects.

 Export SCCM Task Sequence using PowerShell cmdlet Export-CMTaskSequence
Export SCCM Task Sequence using PowerShell cmdlet Export-CMTaskSequence

Next step, you can use the Import-CMTaskSequence cmdlet to import a task sequence to another site.

Leave a Comment