How to Manage the User State in Configuration Manager

 

Updated: February 2, 2016

Applies To: System Center 2012 Configuration Manager, System Center 2012 Configuration Manager SP1, System Center 2012 Configuration Manager SP2, System Center 2012 R2 Configuration Manager, System Center 2012 R2 Configuration Manager SP1

You can use System Center 2012 Configuration Manager task sequences to capture and restore the user state data in operating system deployment scenarios where you want to retain the user state of the current operating system. For example:

  • Side-by-side deployments where you want to capture the user state from one computer to restore it on another computer.

  • Update deployments where you want to capture and restore the user state on the same computer.

Use the following sections to manage the user state in Configuration Manager:

  • User State Capture and Restore Workflows

  • Storing User State Data

  • How to Configure the State Migration Point Role

  • How to Create a Computer Association for Side-by-Side Deployment

  • How to Create a USMT Package

  • How to Capture and Restore User State Data

  • How to Restore the User State Data when the Operating System Deployment Fails

For more information about common user state migration scenarios, see the following:

User State Capture and Restore Workflows

The following illustrations show the actions that are associated with the capture and restoration of user state for a computer.

Workflow for Capturing User State

Workflow for restoring user state.

Storing User State Data

When you capture user state, you can store the user state data on the destination computer (suitable for update deployments) or on a user state migration point (required for side-by-side deployment). To store the user state on a user state migration point, you must use a Configuration Manager site system server that hosts the state migration point site system role. To store the user state on the destination computer, you must configure your task sequence to store the data locally using links.

Note

The links that are used to store the user state locally are referred to as hard-links. Hard-links is a USMT 4.0 feature that scans the computer for user files and settings and then creates a directory of hard-links to those files. The hard-links are then used to restore the user data after the new operating system is deployed.

Important

You cannot use a state migration point and use hard-links to store the user state data at the same time.

To store the user state data on a state migration point, you must perform the following steps:

  1. Configure a state migration point to store the user state data.

  2. Create a computer association between the source computer and the destination computer. You must create this association before you capture the user state on the source computer.

  3. Add steps to your task sequence that captures the user state data and then stores it on the state migration point.

  4. Add steps to your task sequence that retrieves the user state data from the state migration point and then restores the data on the destination computer.

To store the user state data on the destination computer for update deployments, you must perform the following steps:

  • Add steps to your task sequence that capture and store the user state data to a local folder using links.

  • Add steps to your task sequence that restores the user state using those links.

    Note

    The user state data that the hard-links reference remains on the computer after the task sequence removes the old operating system. This is the data that is used to restore the user state when the new operating system is deployed.

How to Configure the State Migration Point Role

You can use the following methods to configure a state migration point to store the user state data:

  • Use the Create Site System Server Wizard to create a new site system server for the state migration point.

  • Use the Add Site System Roles Wizard to add a state migration point to an existing server.

When you use these wizards, you are prompted to provide the following information for the state migration point:

  • The folders to store the user state data.

  • The maximum number of clients that can store data on the state migration point.

  • The minimum free space for the state migration point to store user state data.

  • The deletion policy for the role. You can specify that the user state data is deleted immediately after it is restored on a computer, or after a specific number of days after the user data is restored on a computer.

  • Whether you want the state migration point to respond only to requests to restore user state data. When you enable this option, you cannot use the state migration point to store user state data.

For more information about how to install site system roles, see the Install Site System Roles section of the Install and Configure Site System Roles for Configuration Manager topic.

How to Create a Computer Association for Side-by-Side Deployment

Create a computer association to define a relationship between a source computer and a destination computer for side-by-side deployments. The source computer is an existing computer that Configuration Manager manages. When you deploy the new operating system to the destination computer, the source computer contains the user state that is migrated to the destination computer.

Note

It is not supported to create a computer association between computers located in a Configuration Manager parent site with computers located in a child site. Computer associations are site specific and do not replicate.

To create a computer association

  1. In the Configuration Manager console, click Assets and Compliance.

  2. In the Assets and Compliance workspace, click User State Migration.

  3. On the Home tab, in the Create group, click Create Computer Association.

  4. On the Computer Association tab of the Computer Association Properties dialog box, specify the source computer that has the user state to capture, and the destination computer on which to restore the user state data.

  5. On the User Accounts tab, specify the user accounts to migrate to the destination computer. Specify one of the following settings:

    - **Capture and restore all user accounts**: This setting captures and restores all user accounts. Use this setting to create multiple associations to the same source computer.
    
    - **Capture all user accounts and restore specified accounts**: This setting captures all user accounts on the source computer and only restores the accounts that you specify on the destination computer. In addition, you can use this setting when you want to create multiple associations to the same source computer.
    
    - **Capture and restore specified user accounts**: This setting captures and restores only the accounts that you specify. You cannot create multiple associations to the same source computer when you select this setting.
    

How to Create a USMT Package

To store the user state data locally or on a state migration point, you must create a package that contains the USMT source files that you want to use. This package is specified when you add the Capture User State step to your task sequence.

Use the following procedure to create a USMT package by using the Create Package and Program Wizard. For more information on the Create Package and Program Wizard, see the How to Create a Package and Program by using the Create Package and Program Wizard section of the How to Create Packages and Programs in Configuration Manager topic.

To create a USMT package

  1. On the Package page of the Create Package and Program Wizard, select This package contains source files and browse to the USMT folder in the WAIK folder.

    Only one USMT package is required for x64 and x86 computers, so browse to the root USMT folder. Typically the path to the USMT folder is C:\Program Files\WAIK\tools\USMT.

  2. On the Program Type page of the wizard, select Do not create a program.

  3. Complete the wizard.

How to Capture and Restore User State Data

To capture and restore the user state, you must first create a task sequence, and then edit the task sequence to add the following task sequence steps:

  • Request State Store: This step is needed only if you store the user state on the state migration point.

  • Capture User State: This step captures the user state data and stores it on the state migration point or locally using links.

  • Restore User State: This step restores the user state data on the destination computer. It can retrieve the data from a user state migration point or from the destination computer.

  • Release State Store: This step is needed only if you store the user state on the state migration point. This step removes this data from the state migration point.

You must use the User State Migration Tool (USMT) to complete the capture and restore steps. When you migrate user state from Windows XP to Windows XP, you must use USMT 3.0.1. For all other supported user state migration scenarios, you must use USMT 4.0.

Use the following procedures to add the task sequence steps needed to capture the user state and restore the user state. For more information about how to create a task sequence and how to edit a task sequence, see the following sections in the How to Manage Task Sequences in Configuration Manager topic:

To add task sequence steps to capture the user state

  1. In the Task Sequence list, select a task sequence, and then click Edit.

  2. If you are using a state migration point to store the user state, add the Request State Store step to the task sequence. In the Task Sequence Editor dialog box, click Add, point to User State, and then click Request State Store. Specify the following properties and options for the Request State Store step, and then click Apply.

    On the Properties tab, specify the following options:

    - Enter a name and description for the step.
    
    - Click **Capture state from the computer**.
    
    - In the **Number of retries** box, specify the number of times the task sequence attempts to capture the user state data if an error occurs.
    
    - In the **Retry delay (in seconds)** box, specify how many seconds that the task sequence waits before it retries to capture the data.
    
    - Select the **If computer account fails to connect to state store, use the Network Access account** check box to specify whether to use the Configuration Manager Network Access Account capture the user state data.
    
      For more information about the Network Access Account, see the [Configure the Network Access Account](gg682115\(v=technet.10\).md) section of the [Configuring Content Management in Configuration Manager](gg682115\(v=technet.10\).md) topic.
    

    On the Options tab, specify the following options:

    - Select the **Continue on error** check box if you want the task sequence to continue to the next step if this step fails.
    
    - Specify any conditions that must be met before the task sequence can continue if an error occurs.
    
  3. Add the Capture User State step to the task sequence. In the Task Sequence Editor dialog box, click Add, point to User State, and then click Capture User State. Specify the following properties and options for the Capture User State step, and then click OK.

    Important

    When you add this step to your task sequence, also set the OSDStateStorePath task sequence variable to specify where the user state data is stored. If you store the user state locally, do not specify a root folder as that can cause the task sequence to fail. When you store the user data locally always use a folder or subfolder. For information about this variable, see Capture User State Task Sequence Action Variables.

    On the Properties tab, specify the following options:

    - Enter a name and description for the step.
    
    - Specify the package that contains the USMT source file used to capture the user state data.
    
    - Specify the user profiles to capture:
    
        - Click **Capture all user profiles with standard options** to capture all user profiles.
    
        - Click **Customize user profile capture** to specify individual user profiles to capture.
    
    - Select **Enable verbose logging** to specify how much information to write to log files if an error occurs.
    
    - Select **Skip files that use the Encrypting File System (EFS)**.
    
    - Select **Copy by using file system access** to specify the following settings:
    
        - **Continue if some files cannot be captured**: This setting allows the task sequence step to continue the migration process even if some files cannot be captured. If you disable this option and a file cannot be captured, the task sequence step fails. This option is enabled by default.
    
        - **Capture locally by using links instead of by copying files**: This setting allows you to use the hard link migration feature that is available in USMT 4.0. This setting is ignored if you use versions of USMT that are earlier than USMT 4.0.
    
        - **Capture in off-line mode (Windows PE only)**: This setting allows you to capture use state from Windows PE without booting to the existing operating system. This setting is ignored if you use versions of USMT that are earlier than USMT 4.0.
    
    - Select **Capture by using Volume Copy Shadow Services (VSS)**. This setting is ignored if you use versions of USMT that are earlier than USMT 4.0.
    

    On the Options tab, specify the following options:

    - Select the **Continue on error** check box if you want the task sequence to continue to the next step if this step fails.
    
    - Specify any conditions that must be met before the task sequence can continue if an error occurs.
    
  4. If you are using a state migration point to store the user state, add the Release State Store step to the task sequence. In the Task Sequence Editor dialog box, click Add, point to User State, and then click Release State Store. Specify the following properties and options for the Release State Store step, and then click OK.

    Important

    The task sequence action that runs before the Release State Store step must be successful before the Release State Store step is started.

    On the Properties tab, enter a name and description for the step.

    On the Options tab, specify the following options.

    - Select the **Continue on error** check box if you want the task sequence to continue to the next step if this step fails.
    
    - Specify any conditions that must be met before the task sequence can continue when an error occurs.
    

Deploy this task sequence to capture the user state on a destination computer. For information about how to deploy task sequences, see the How to Deploy a Task Sequence section in the How to Manage Task Sequences in Configuration Manager.

To add task sequence steps to restore the user state

  1. In the Task Sequence list, select a task sequence, and then click Edit.

  2. Add the Restore User State step to the task sequence. In the Task Sequence Editor dialog box, click Add, point to User State, and then click Restore User State. This step establishes a connection to the state migration point. Specify the following properties and options for the Restore User State step, and then click OK.

    On the Properties tab, specify the following properties:

    - Enter a name and description for the step.
    
    - Specify the package that contains the USMT to restore the user state data.
    
    - Specify the user profiles to restore:
    
        - Click **Restore all captured user profiles with standard options** to restore all user profiles.
    
        - Click **Customize user profile capture** to restore individual user profiles.
    
    - Select **Restore local computer user profiles** to provide a new password for the restored profiles. You cannot migrate passwords for local profiles.
    
      <div class="alert">
    
    
      > [!NOTE]
      > <P>When you have local user accounts, and you use the <STRONG>Capture User State</STRONG> step and select <STRONG>Capture all user profiles with standard options</STRONG>, you must select the <STRONG>Restore local computer user profiles</STRONG> setting in the <STRONG>Restore User State</STRONG> step or the task sequence will fail.</P>
    
    
      </div>
    
    - Select **Continue if some files cannot be restored** if you want the **Restore User State** step to continue if a file cannot be restored.
    
      If you store the user state by using local links and the restore is not successful, the administrative user can manually delete the hard-links that were created to store the data or the task sequence can run the USMTUtils tool. If you use USMTUtils to delete the hard-link, add a [Restart Computer](hh846237\(v=technet.10\).md) step after you run USMTUtils.
    
    - Select **Enable verbose logging** to specify how much information to write to log files if an error occurs.
    

    On the Options tab, specify the following options:

    - Select the **Continue on error** check box if you want the task sequence to continue to the next step if this step fails.
    
    - Specify any conditions that must be met before the task sequence can continue if an error occurs.
    
  3. If you are using a state migration point to store the user state, add the Release State Store step to the task sequence. In the Task Sequence Editor dialog box, click Add, point to User State, and then click Release State Store. Specify the following properties and options for the Release State Store step, and then click OK.

    Important

    The task sequence action that runs before the Release State Store step must be successful before the Release State Store step is started.

    On the Properties tab, enter a name and description for the step.

    On the Options tab, specify the following options.

    - Select the **Continue on error** check box if you want the task sequence to continue to the next step if this step fails.
    
    - Specify any conditions that must be met before the task sequence can continue when an error occurs.
    

Deploy this task sequence to restore the user state on a destination computer. For information about deploying task sequences, see the How to Deploy a Task Sequence section in the How to Manage Task Sequences in Configuration Manager topic.

How to Restore the User State Data when the Operating System Deployment Fails

If the operating system deployment fails, use the USMT 4.0 LoadState feature to retrieve the user states data was captured during the deployment process. This includes data that is stored on a state migration point or data that is saved locally on the destination computer. For more information on this USMT feature, see LoadState Syntax.