How the settings in ConfigMgr translate to the command line in USMT

The last couple of days I’ve seen and read a few situations in which it was clear that it’s not always that obvious what the USMT command line will be based on the settings in ConfigMgr. This blog post will be about the different settings in a task sequence for capturing and restoring the user state and how they translate to the command line for USMT.

Capture User State

CaptureLet’s start with two basic capture settings and continue from there. These basic settings are Capture all user profiles by using standard options and Copy by using file system access. These settings combine to a command line like this C:\_SMSTaskSequence\Packages\PCP00001\amd64\scanstate.exe C:\_SMSTaskSequence\UserState /o /localonly /efs:copyraw /l:C:\WINDOWS\CCM\Logs\SMSTSLog\scanstate.log /progress:C:\WINDOWS\CCM\Logs\SMSTSLog\scanstateprogress.log /i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\migapp.xml.

Based on that command line we can see that by default it will overwrite any existing data in the migration store (/o) and it will only migrate data from the local computer (/localonly). Also, it does standard things like using log files (/l and /progress) and using standard configuration files (/i). The following table lists the adjustments to this command line when selecting different options in the task sequence editor.

Option Command
Enable verbose logging /v:5
Skip files that use the Encrypting File System /efs:skip
Continue if some files cannot be captured /c
Capture locally by using links instead of copying files /hardlink /nocompress
Capture in off-line mode (Windows PE only) /offlineWinDir:D:\WINDOWS
Capture by using Volume Copy Shadow Services (VSS) /vsc
Customize how user profiles are captured /i:D:\_SMSTaskSequence\Packages\PCP00001\x86\Example1.xml
/i:D:\_SMSTaskSequence\Packages\PCP00001\x86\Example2.xml

Restore User State

RestoreLet’s start with one basic restore setting and continue from there. This basic setting is Restore all captured user profiles with standard options. This setting translates to a command line like this C:\_SMSTaskSequence\Packages\PCP00001\amd64\loadstate.exe C:\_SMSTaskSequence\UserState /l:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstate.log /progress:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstateprogress.log /i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\migapp.xml

Based on that command line we can see that by default it does standard things like using log files (/l and /progress) and using standard configuration files (/i). The following table lists the adjustments to this command line when selecting different options in the task sequence editor.

Option Command
Continue if some files cannot be restored /c
Restore local computer user profiles /lae /lac:Password01
Enabled verbose logging /v:5
Customize how user profiles are restored /i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\Example1.xml
/i:C:\_SMSTaskSequence\Packages\PCP00001\amd64\Example2.xml

Extra options

Somebody familiar with USMT might notice that this doesn’t even cover half of the settings available for USMT. The nice thing is that it’s also possible to use these other command line switches. There are three task sequence variables that give extra options during the capturing and restoring of user state.

  1. OSDStateStorePath – Specify the UNC or local path name of the folder where the user state is saved. My personal preference is a folder out-side the task sequence cache, like %SystemDrive%\UserState.
  2. OSDMigrateAdditionalCaptureOptions – Specify additional USMT command line options that are used when capturing the user state. This could be used to exclude accounts from the migration, by using one of the /ue command line options.
  3. OSDMigrateAdditionalRestoreOptions – Specifies additional USMT command line options that are used when restoring the user state. This could be used to exclude accounts from the migration, by using one of the /ue command line options.

More information about the task sequence action variables, see: http://technet.microsoft.com/en-us/library/hh273365.aspx
More information about the USMT command line options, see: http://technet.microsoft.com/en-us/library/hh825175.aspx

Share

An overview of my posts about ConfigMgr 2012 SP1

Let’s start my first post, of this new year, with an overview of my latest post about ConfigMgr 2012 Service Pack (SP) 1. Normally I’m not really the kind of person that looks back, but in this case it’s with a reason, as most of my posts where with pre-release versions of SP1. I also tried to sort all my posts per subject, even though sometimes there is some overlap. The following posts are all tested, this week, with the RTM version of SP1 and I can confirm that they are still working:

System Center Orchestrator

Windows Azure

Windows Intune

OS Deployment

Application Deployment

Client Settings

Share

Migrating to Windows 8 by using hard-links with ConfigMgr 2012

After the release of Windows 8 last week we can already start thinking about migrating. When I’m thinking about migrations I always like the computer-refresh scenario’s where we can use hard-links. In this post I will show a basic task sequence to capture user files and settings, either offline or online, with help of hard-links. I already showed the basics of that in an earlier post last year when ConfigMgr 2012 was still in Beta. Since then the Wizard screens have not changed so I will not show that again, but  I will show some more information about what happens.

Prerequisites

To support migrating to Windows 8 we need ConfigMgr 2012 SP1 (which is currently still CTP) in place with at least the following packages:

  • Boot Image package, of at least version 6.2.xxxx
  • ConfigMgr client package
  • USMT 5.0 package, of at least version 6.2.xxxx
  • Image package, which can be the default install.wim of Windows 8

Basic steps

To create a task sequence that can migrate to Windows 8 we can use the following steps (for screenshot see my earlier post of last year):

  • Right-click the Task Sequence node and select Create Task Sequence.
  • On the Create a New Task Sequence page, select Install an existing image package and click Next.
  • On the Task Sequence Information page, fill in a Task sequence name, Browse for the Boot image and click Next.
  • On the Install Windows page, browse for the Image package, uncheck Partition and format the target computer before installing the operating system, (optional) uncheck Configure task sequence for use with Bitlocker, (optional) fill in a Product key, (optional) select Always use the same administrator password and click Next.
  • On the Configure Network page, (optional) select Join a domain, Browse for the Domain and Domain OU, Set an Account and click Next.
  • On the Install ConfigMgr page, Browse for the ConfigMgr client Package, (optional) fill in the Installation Properties and click Next.
  • On the State Migration page, select Capture user settings, Browse for the USMT Package, select Save user settings locally, (optional) uncheck Capture network settings, (optional) uncheck Capture Microsoft Windows settings and click Next.
  • On the Install Updates page, click Next.
  • On the Install Applications page, click Next.
  • On the Summary page, click Next.
  • On the Progress page, just wait…
  • On the Confirmation page, click Close.

Advanced steps

The basic steps will create a task sequence that will only perform it’s capture while the task sequence is running online (Full OS). Also notice that the task sequence already sets the ‘extra’ task sequence variable OSDStateStorePath to the value %_SMSTSUserStatePath%. But when we also want to be able to perform an capture while the task sequence is running offline (WinPE), we need to make the following small adjustments.

  • TSEd_RemConSelect the Capture Files and Settings Group, go to the Options tab and Remove the Conditions (or remove the whole top Group).

    Explanation: This is necessary to make it possible to also capture user files and settings in WinPE.

  • Select the Capture User Files and Settings Step (optional: change the name), go to the Options tab and add the condition of _SMSTSInWinPE equals FALSE.

    TSEd_FullOSExplanation: This is necessary to make this step only run in FullOS. This step will run the following scanstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\scanstate.exe C:\_SMSTaskSequence\UserState /o /localonly /efs:copyraw /c /hardlink /nocompress /l:C:\Windows\CCM\Logs\SMSTSLog\scanstate.log /progress:C:\Windows\CCM\Logs\SMSTSLog\scanstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

  • TSEd_WinPEAdd an extra Capture User State Step (optional: change the name), select Copy by using file system access and check Continue if some files cannot be captured, Capture locally by using links instead of copying files and Capture in off-line mode (Windows PE only). Now go to the Options tab and add the condition of _SMSTSInWinPE equals TRUE.

    Explanation: This is necessary to make this step only run in WinPE.This step will run the following scanstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\scanstate.exe C:\_SMSTaskSequence\UserState /o /localonly /efs:copyraw /offlineWinDir:C:\WINDOWS /c /hardlink /nocompress /l:X:\WINDOWS\TEMP\SMSTSLog\scanstate.log /progress:X:\WINDOWS\TEMP\SMSTSLog\scanstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

  • TSEd_RestTo complete the overview, I’ll show here the default values of the restore settings. (Optional) Select Restore local computer user profiles and give in a password.

    Explanation: This step will run the following loadstate command: C:\_SMSTaskSequence\Packages\<ID>\amd64\loadstate.exe C:\_SMSTaskSequence\UserState /ue:<computername>\* /c /hardlink /nocompress /l:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstate.log /progress:C:\WINDOWS\CCM\Logs\SMSTSLog\loadstateprogress.log /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migdocs.xml /i:C:\_SMSTaskSequence\Packages\<ID>\amd64\migapp.xml

I still remember creating all batch files to perform these actions. Now they are possible out of the box!

Result

Now running this task sequence from either Full OS or WinPE will result in something like the example under here. In this example I migrated some files, folders and background. This last one will show as first in the new Windows 8 machine.

Before After
Before After
Share

All ConfigMgr 2012 related releases combined

What a week it was! As we all expected the last week was one full of cool announcements and releases. In this post I will give an overview of all the ConfigMgr 2012 related releases of last week.

  • System Center 2012 empowers you with a common management toolset for your private and public cloud applications and services. System Center helps you confidently deliver IT as a Service for your business. System Center 2012 is available in English.
    Download System Center 2012: http://bit.ly/Jzfak9
  • System Center 2012 Configuration Manager Component Add-ons and Extensions
    • Package Conversion Manager (PCM). The Microsoft System Center 2012 Configuration Manager Package Conversion Manager allows for converting packages and programs into applications and deployment types in System Center Configuration Manager 2012. There is a migration feature which will be released with the Configuration Manager 2012 that allows packages to be migrated from 2007 to 2012. Once you have migrated your package objects and installed PCM then it is just a matter analyzing your packages in order to determine which readiness state each are in, and then converting those packages that are in the appropriate readiness state. This release comes in 4 languages.
    • Physical to Virtual (P2V) Migration Toolkit. The System Center 2012 Configuration Manager P2V Migration Toolkit facilitates the re-utilization of existing x64 server hardware using virtualization technologies, Windows Server 2008 R2 and Hyper-V. The P2V Migration Toolkit was specifically designed to assist in situations where there are remote Configuration Manager 2007 SP 2 site servers that need to be retained during side-by-side migration process to System Center 2012 Configuration Manager. The P2V Migration Toolkit is geared to supporting P2V migrations at remote, branch offices that do not have existing onsite Virtual Machine Manager infrastructure.
    • System Center 2012 Configuration Manager Toolkit. The Microsoft System Center 2012 Configuration Manager Toolkit contains nine downloadable tools to help you manage and troubleshoot Microsoft System Center 2012 Configuration Manager. The toolkit contains the following tools: Client Spy, Policy Spy, Security Configuration Wizard, Send Schedule Tool, Power Viewer Tool, Deployment Monitoring Tool, Run Metering Summarization Tool, Role-based Administration Modeling and Auditing Tool and the License Tracking PowerShell Cmdlets.

    Download Configuration Manager Component Add-ons and Extensions: http://bit.ly/Hi5ARZ

  • Microsoft Deployment Toolkit (MDT) 2012 is the newest version of Microsoft Deployment Toolkit, a Solution Accelerator for operating system and application deployment. MDT 2012 supports deployment of Windows 7, Office 2010 and 365, and Windows Server 2008 R2 in addition to deployment of Windows Vista, Windows Server 2008, Windows Server 2003, and Windows XP.
    Download MDT 2012: http://bit.ly/HRYyce
  • (Actually not released this week but it does contain some really cool ConfigMgr related tools, like USMT 5.0!) Windows® Assessment and Deployment Kit (Windows ADK) is a collection of tools and documentation that you can use to customize, assess, and deploy Windows operating systems to new computers. You can install the Windows ADK directly from the internet, or you can download the tools and copy them to a computer that does not have internet access.
    Download Windows ADK: http://bit.ly/y9gQRl

Well, that’s a nice list of some very cool releases. While I’m busy sharing links now anyway I think it’s also cool to mention that Maik Koster released a new version of his MDT Web Frontend (with support for ConfigMgr 2012).
Download MDT Web Frontend: http://bit.ly/I63EBv

Share