How to get the SCCM/MDT Task Sequence XML file


SCCM 2012/SCCM CB

If you open a PowerShell window from within the SCCM console, run the following command

(Get-CMTaskSequence | Where-Object {$_.Name -eq "<TaskSequenceName>"}).Sequence | Out-File <Path>\ts.xml

Note: Make sure you replace <TaskSequenceName> and <Path> before running the command


If you open a PowerShell window from a server/desktop where the SCCM console is installed, run the following commands

$CMfolder = split-path $env:SMS_ADMIN_UI_PATH
Import-Module $CMfolder\ConfigurationManager.psd1
set-location <SiteName>:
(Get-CMTaskSequence | Where-Object {$_.Name -eq "<TaskSequenceName>"}).Sequence | Out-File <Path>\ts.xml

Note: Make sure you replace <SiteName>, <TaskSequenceName> and <Path> before running the commands


MDT

The ts.xml file is located in the %DeployRoot%\Control\<TaskSequenceID>\ directory.


SCCM 2007

Right click on the task sequence and select Export


How to save the output

You need to use Firefox or Chrome to save the output (Right click, Save as... or Save Page As...)


Privacy

All processing is performed in memory. Nothing is saved or logged.