在 Configuration Manager 中管理用户状态Manage user state in Configuration Manager

适用范围: Configuration Manager (Current Branch)Applies to: Configuration Manager (current branch)

在希望保留当前操作系统的用户状态的操作系统部署方案中,可以使用 Configuration Manager 任务序列来捕获和还原用户状态数据。You can use 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:

  • 某些部署,其中你希望从一台计算机中捕获用户状态,然后在另一台计算机上将其还原。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.

操作系统安装完成后,Configuration Manager 使用用户状态迁移工具 (USMT) 10.0 来管理从源计算机到目标计算机的用户状态数据迁移。Configuration Manager uses the User State Migration Tool (USMT) 10.0 to manage the migration of user state data from a source computer to a destination computer after the operating system installation completes. 有关 USMT 10.0 常见迁移方案的详细信息,请参阅 常见迁移方案For more information about common migration scenarios for the USMT 10.0, see Common Migration Scenarios.

使用以下部分可帮助你捕获和还原用户数据。Use the following sections to help you capture and restore user data.

存储用户状态数据Store user state data

捕获用户状态时,可以在目标计算机或状态迁移点上存储用户状态数据。When you capture user state, you can store the user state data on the destination computer or on a state migration point. 要将用户状态存储在用户状态迁移点上,你必须使用承载状态迁移点站点系统角色的 Configuration Manager 站点系统服务器。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.

备注

用于以本地方式存储用户状态的链接称为硬链接。The links that are used to store the user state locally are referred to as hard-links. 硬链接是一项 USMT 10.0 功能,该功能将扫描计算机以查找用户文件和设置,然后创建指向这些文件的硬链接的目录。Hard-links is a USMT 10.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.

重要

你无法同时使用状态迁移点和使用硬链接来存储用户状态数据。You cannot use a state migration point and use hard-links to store the user state data at the same time.

捕获用户状态信息后,可以使用下列方法之一存储信息:When the user state information is captured, the information can be stored in one of the following ways:

  • 你可以通过配置状态迁移点以远程存储用户状态数据。You can store the user state data remotely by configuring a state migration point. 捕获 任务序列将数据发送到状态迁移点。The Capture task sequence sends the data to the state migration point. 然后,在部署操作系统之后, 还原 任务序列将检索数据并在目标计算机上还原用户状态。Then, after the operating system is deployed, the Restore task sequence retrieves the data and restores the user state on the destination computer.

  • 你可以以本地方式将用户状态数据存储到特定位置。You can store the user state data locally to a specific location. 在此方案中, 捕获 任务序列将用户数据复制到目标计算机上的特定位置。In this scenario, the Capture task sequence copies the user data to a specific location on the destination computer. 然后,在部署操作系统之后, 还原 任务序列从该位置检索用户数据。Then, after the operating system is deployed, the Restore task sequence retrieves the user data from that location.

  • 你可以指定可用于将用户数据还原到其原始位置的硬链接。You can specify hard links that can be used to restore the user data to its original location. 在此方案中,删除旧操作系统时,用户状态数据会保留在驱动器上。In this scenario, the user state data remains on the drive when the old operating system is removed. 然后,在部署新操作系统之后, 还原 任务序列使用硬链接将用户状态数据还原到其原始位置。Then, after the new operating system is deployed, the Restore task sequence uses the hard-links to restore the user state data to its original location.

在状态迁移点上存储用户数据Store user data on a state migration point

要将用户状态数据存储在状态迁移点上,必须执行下列操作:To store the user state data on a state migration point, you must do the following:

  1. 用于存储用户状态数据的Configure a state migration pointConfigure a state migration point to store the user state data.

  2. 在源计算机和目标计算机之间Create a computer associationCreate 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. 创建用于捕获和还原用户状态的任务序列Create a task sequence to capture and restore user state. 具体而言,必须添加下列任务序列步骤以从计算机捕获用户数据,在状态迁移点上存储用户日期并将用户数据还原到一台计算机:Specifically, you must add the following task sequence steps to capture user data from a computer, store the user date on a state migration point, and restore the user data to a computer:

    • 请求状态存储,在从计算机捕获状态或将状态还原到计算机时请求访问状态迁移点。Request State Store to request access to a state migration point when capturing state from a computer or restoring state to a computer.

    • 捕获用户状态,捕获用户状态数据并将其存储在状态迁移点上。Capture User State to capture and store the user state data on the state migration point.

    • 还原用户状态,通过从用户状态迁移点检索数据在目标计算机上还原用户状态。Restore User State to restore the user state on the destination computer by retrieving the data from a user state migration point.

    • 发布状态存储,通知状态迁移点捕获或还原操作已完成。Release State Store to notify the state migration point that the capture or restore action is complete.

在本地存储用户数据Store user data locally

若要在本地存储用户状态数据,必须执行以下操作:To store the user state data locally, you must do the following:

  • 创建用于捕获和还原用户状态的任务序列Create a task sequence to capture and restore user state. 具体而言,必须添加下列任务序列步骤以从计算机捕获用户数据,并通过使用硬链接将用户数据还原到一台计算机;Specifically, you must add the following task sequence steps to capture user data from a computer and restore the user data to a computer by using hard-links;

    • 捕获用户状态,捕获用户状态数据并通过使用硬链接将其存储到本地文件夹。Capture User State to capture and store the user state data to a local folder by using hard-links.

    • 还原用户状态,使用硬链接,通过检索数据在目标计算机上还原用户数据。Restore User State to restore the user state on the destination computer by retrieving the data by using hard-links.

      备注

      在任务序列删除旧操作系统后,硬链接引用的用户状态数据保留在计算机上。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.

Configure a state migration pointConfigure a state migration point

状态迁移点在一台计算机上存储捕获的用户状态数据,然后在另一台计算机上还原这些数据。The state migration point stores user state data that is captured on one computer and then restored on another computer. 但是,当你在同一台计算机上捕获操作系统部署的用户设置时(例如在目标计算机上刷新操作系统的部署),你可以通过使用硬链接将数据存储在同一台计算机上或将数据存储在状态迁移点上。However, when you capture user settings for an operating system deployment on the same computer, such as a deployment where you refresh the operating system on the destination computer, you can store the data on the same computer by using hard-links or on a state migration point. 对于某些计算机部署,当你创建状态存储时,Configuration Manager 会自动在状态存储和目标计算机之间创建关联。For some computer deployments, when you create the state store, Configuration Manager automatically creates an association between the state store and the destination computer. 你可以使用下列方法来配置状态迁移点以存储用户状态数据: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 the state migration point responds 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 the state migration point and the steps to configure it, see State migration point.

Create a computer associationCreate a computer association

当你在新硬件上安装操作系统并且想捕获和还原用户数据设置时,请创建计算机关联以定义源计算机和目标计算机之间的关系。Create a computer association to define a relationship between a source computer and a destination computer when you install an operating system on new hardware and want to capture and restore user data settings. 源计算机是 Configuration Manager 管理的现有计算机。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.

备注

不支持在 Configuration Manager 父站点中的计算机与子站点中的计算机之间创建计算机关联。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. 在 Configuration Manager 控制台中,单击“资产和符合性” 。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.

在操作系统部署失败时还原用户状态数据Restore user state data when an operating system deployment fails

如果操作系统部署失败,请使用 USMT 10.0 LoadState 功能检索在部署过程中捕获的用户状态数据。If the operating system deployment fails, use the USMT 10.0 LoadState feature to retrieve the user states data that 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. 有关此 USMT 功能的详细信息,请参阅 LoadState 语法For more information on this USMT feature, see LoadState Syntax.