Whole Disk .WIM backup using SCCM 2012 R2

Whole Disk .WIM backup using SCCM 2012 R2


Recently I needed to provide my client with a little confidence in OSD around what was possible with backups … there was some fear over users data etc … so I needed to lay down the Iron Curtain … the task was simple and yet politically complex as they needed to capture certain users entire disk drives for many uninteresting reasons…

Now, we have a few options available to us when it comes to SCCM, we could use witchcraft enchantment spells called hard-link and create a state-store (USMT) that holds the data inside a folder on the C Drive. Or we could summon the powers of the State Migration Points and keep data in users profiles for a certain period of time in hardware replacement scenarios. But what if all you need is to capture everything in one go?

Easy, here’s how and it will take you about 10 minutes to set it up.

NOTE: This task sequence is for backup to a .WIM file, there is no sysprep etc … 

Step 1. Confirm that you have setup and configured your network access account. Click Administration – Expand Site Configuration – Click on Sites – From the top Ribbon click Configure Site Components – Click on Software Distribution – Click on the Network Access Account Tab  

This account needs permissions on the content folders we use for OSD, so ensure it has permissions over your deployment shares.

Step 2. Create a blank Task Sequence. Click on Software Library – Expand Operating Systems – Right Click on Task Sequences – Click on Create a Task Sequence.

Choose to Create a new Custom Task Sequence.

Custom Task Sequence 1

Give your TS an awesome name, and fill in the Description …

Custom Task Sequence 2

Review the Summary Page …

Custom Task Sequence 3

Ensure the Witchcraft is taking affect …

Custom Task Sequence 4

And we’re done!

Custom Task Sequence 5

Step 3. Conjure the task sequence spirits …

Right click and Edit your newly made TS, you will notice its completely empty. So, lets fill it out.

On TS – Click AddGeneral – Click on Restart Computer. We needs to bounce the client into WinPE to capture the users disk and and turn it into a .WIM file. Please make sure that you Specify what to run after the restart = The boot image assigned to this task sequence. This will ensure that we boot into WinPE. Under Options add a task Sequence Variable of _SMSTSInWinPE equals FALSE. As shown below.

Edit Task Sequence 1

Edit Task Sequence 1.5

Next we needs to use our MDT Toolkit package! Now if you’re wondering if you have a MDT toolkit package or not, you would have created one when you integrated SCCM with MDT and subsequently created a MDT Task Sequence via SCCM.

If you haven’t integrated SCCM with MDT have a dig online – but the TheDesktopTeam will be covering that topic with SCCM 2012 R2 in a later post.

Anyways … Click AddMDT – And Click “Use Toolkit Package” and select your MDT Toolkit Package. As shown below.

Edit Task Sequence 2

Next we have to specify the backup location and for this we will use a standard Task Variable – Click AddGeneral – Click on Set Task Sequence Variable – Change the Name to Backup Location (so you know which step in the TS it is) and set the Task Sequence Variable = ComputerBackupLocation the Value = \\ServerName\BackupLocation (where ServerName and BackupLocation are where you want to store the .WIM after the TS has run) as shown below.

Edit Task Sequence 3

Next we have to make sure that SCCM knows what to put in the backup location we specified. So, next we have to Click AddGeneral – and click Run Command Line. Change the Name to Capture WIM. As we are in WinPE we have to tell SCCM which commands we want to run, that command is this cscript.exe “%DeployRoot%\Scripts\ZTIBackup.wsf” 

NOTE: Copy this command into notepad and re-do the speech marks ” ” if these are wrong it will fail) as shown below.

Edit Task Sequence 4

Lastly, once everything is done, we need to add in one last Reboot to complete the process as with the first step, add in a reboot step and under “Specify what to run after the restart”, choose “The currently installed default operating system” as shown below.

Edit Task Sequence 5

Deploy this task sequence as you would with any other Task Sequence, it will run from the Desktop and via PXE.

You can restore the .WIM file a simple SCCM or MDT task sequence.

Enjoy – Heinrich Pelser 🙂


Heinrich is a Consultant working firmly on the grey area between the Private Cloud and the Desktop. He has a keen focus and love for Configuration Manager 2012 and beyond, delivering and working on a Desktop Deployments as well as Private and Hybrid Cloud solutions.

Tagged with: , , , ,