How to get the ConfigMgr/SCCM/MDT Task Sequence XML file
ConfigMgr/SCCM
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
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.
How to save the output
You need to use Firefox or Chrome to save the output (Right click, Save as... or Save Page As...)