管理任务序列来自动执行任务Manage task sequences to automate tasks

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

使用任务序列在 Configuration Manager 环境中自动执行步骤。Use task sequences to automate steps in your Configuration Manager environment. 这些步骤可将 OS 映像部署到目标计算机,通过一组 OS 安装文件生成和捕获 OS 映像,并捕获和还原用户状态信息。These steps can deploy an OS image to a destination computer, build and capture an OS image from a set of OS installation files, and capture and restore user state information. 任务序列位于 Configuration Manager 控制台中。Task sequences are located in the Configuration Manager console. 在“软件库”工作区中,展开“操作系统”,并选择“任务序列” 。In the Software Library workspace, expand Operating Systems, and select Task Sequences. 将“任务序列”节点(包括所创建的子文件夹)复制到整个 Configuration Manager 层次结构。The Task Sequences node, including subfolders that you create, is replicated throughout the Configuration Manager hierarchy. 有关计划的信息,请参阅计划自动执行任务时的考虑事项For planning information, see Planning considerations for automating tasks.

创建Create

通过使用创建任务序列向导来创建任务序列。Create task sequences by using the Create Task Sequence Wizard. 此向导可创建下列类型的任务序列:This wizard can create the following types of task sequences:

编辑Edit

通过添加或删除步骤、添加或删除组或者更改步骤的顺序来修改任务序列。Modify a task sequence by adding or removing steps, adding or removing groups, or by changing the order of the steps. 有关详细信息,请参阅使用任务序列编辑器For more information, see Use the task sequence editor.

减少任务序列策略的大小Reduce the size of task sequence policy

当任务序列策略的大小超出 32 MB 时,客户端将无法处理此大型策略。When the size of the task sequence policy exceeds 32 MB, the client fails to process the large policy. 因而客户端将无法运行任务序列部署。The client then fails to run the task sequence deployment.

存储在站点数据库中的任务序列的大小较小,但如果过大,仍可能会导致问题。The size of the task sequence as stored in the site database is smaller, but can still cause problems if too large. 当客户端处理整个任务序列策略时,扩展的大小可能导致 32 MB 以上的问题。When the client processes the entire task sequence policy, the expanded size can cause problems over 32 MB.

自版本 2006 起,若要检查客户端上是否有 32-MB 任务序列策略大小,请使用管理见解Starting in version 2006, to check for the 32-MB task sequence policy size on clients, use management insights.

若要帮助减少任务序列部署策略的总大小,请执行以下操作:To help reduce the overall size of policy of a task sequence deployment, take the following actions:

  • 将功能段分隔到子任务序列,并使用运行任务序列步骤。Separate functional segments into child task sequences, and use the Run Task Sequence step. 每个任务序列的策略大小限制分别为 32 MB。Each task sequence has a separate 32-MB limit on its policy size.

    备注

    减少任务序列中的步骤和组的总数,对策略大小影响甚微。Reducing the total number of steps and groups in a task sequence has minimal impact on the policy size. 通常策略中每个步骤的大小为几 KB。Each step is generally a couple of KB in policy. 将各个步骤组移到子任务序列的效果更好。Moving groups of steps to a child task sequence is more impactful.

  • 部署与任务序列面向同一个集合时,减少其中的软件更新数量。Reduce the number of software updates in deployments to the same collection as the task sequence.

  • 通过程序包引用脚本,而不要在运行 PowerShell 脚本步骤中输入脚本。Instead of entering a script in the Run PowerShell Script step, reference it via a package.

  • 任务序列环境运行时,对它的大小限制为 8 KB。There's an 8-KB limit on the size of the task sequence environment when it runs. 检查自定义任务序列变量的使用情况,这也会影响策略大小。Review the usage of custom task sequence variables, which can also contribute to the policy size.

  • 最后一个方法是,将复杂动态任务序列拆分为单独的任务序列,其中包含到不同集合的各种部署。As a last resort, split a complex, dynamic task sequence into separate task sequences with distinct deployments to different collections.

软件中心属性Software Center properties

使用以下过程配置软件中心中显示的任务序列的详细信息。Use the following procedure to configure the details for the task sequence displayed in Software Center. 这些详细信息仅供参考。These details are for information only.

  1. 在 Configuration Manager 工作区中,转到“软件库”工作区,展开“操作系统”,选择“任务序列” 。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and select Task Sequences.

  2. 选择要编辑的任务序列,然后选择“属性”。Select the task sequence to edit, and select Properties.

  3. 在“常规”选项卡上,可使用软件中心的以下设置:On the General tab, the following settings for Software Center are available:

    • 需要重启:让用户了解安装期间是否需要重启。Restart required: Lets the user know whether a restart is required during the installation.

    • 下载大小 (MB) :指定任务序列在软件中心中显示多少兆字节。Download size (MB): Specifies how many megabytes are displayed in Software Center for the task sequence.

    • 预计运行时间(分钟) :指定任务序列在软件中心显示的预计运行时间(以分钟为单位)。Estimated run time (minutes): Specifies the estimated run time in minutes that's displayed in Software Center for the task sequence.

高级设置Advanced settings

按照以下步骤在 Configuration Manager 客户端上配置任务序列的行为。Use the following procedure to configure the behavior of the task sequence on the Configuration Manager client.

  1. 在 Configuration Manager 工作区中,转到“软件库”工作区,展开“操作系统”,选择“任务序列” 。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and select Task Sequences.

  2. 选择要编辑的任务序列,然后选择“属性”。Select the task sequence to edit, and select Properties.

  3. 在“高级”选项卡上,有下列可用设置:On the Advanced tab, the following settings are available:

    • 首先运行其他程序:选择此选项,可在此任务序列之前在其他包中运行一个程序。Run another program first: Select this option to run a program in another package before the task sequence runs. 默认情况下,此复选框已清除。By default, this check box is cleared. 不需要单独部署指定要首先运行的程序。You don't need to separately deploy the program that you specify to run first.

      重要

      此设置仅适用于在完整 OS 中运行的任务序列。This setting applies only to task sequences that run in the full OS. 如果使用 PXE 或启动媒体启动任务序列,Configuration Manager 将忽略此设置。If you start the task sequence by using PXE or boot media, Configuration Manager ignores this setting.

      • :浏览包含要在此任务序列之前运行的程序的包。Package: Browse for the package that contains the program to run before this task sequence.

      • 程序:选择要在此任务序列之前运行的程序。Program: Select the program to run before this task sequence.

      备注

      如果所选程序在客户端上运行失败,则任务序列不会运行。If the selected program fails to run on a client, the task sequence doesn't run. 如果所选程序成功运行,则它不会再次运行,即使在同一客户端上重新运行了任务序列。If the selected program runs successfully, it doesn't run again, even if the task sequence is rerun on the same client.

    • 取消任务序列通知:选择此选项可隐藏“新软件可用”Toast 通知。Suppress task sequence notifications: Select this option to hide the New Software is available toast notification. “新软件”图标仍会显示在软件中心的通知区域中。You still see the New software icon from Software Center in the notification area. 默认情况下禁用此选项。By default, this option is disabled.

    • 在部署此任务序列的计算机上禁用该任务序列:如果选择此选项时,Configuration Manager 会暂时禁用包含此任务序列的所有部署。Disable this task sequence on computers where it is deployed: If you select this option, Configuration Manager temporarily disables all deployments that contain this task sequence. 也会将任务序列从可运行部署列表中删除。It also removes the task sequence from the list of deployments available to run. 在启用之前,不会运行任务序列。The task sequence doesn't run until you enable it. 默认情况下禁用此选项。By default, this option is disabled.

    • 允许的最长运行时间:指定预计任务序列在目标计算机上运行的最长时间(分钟)。Maximum allowed run time: Specifies the maximum time in minutes that you expect the task sequence to run on the destination computer. 使用等于或大于零的整数。Use a whole number equal to or greater than zero. 默认情况下,此值为 120 分钟。By default, this value is 120 minutes.

      重要

      当将维护时段用于部署此任务序列的集合时,如果“最大允许运行时间”大于计划的维护时段,就可能出现冲突。If you're using maintenance windows for the collection to which you deploy this task sequence, a conflict might occur if the Maximum allowed run time is longer than the scheduled maintenance window. 如果最大运行时间设置为 0,任务序列将在维护时段启动。If you set the maximum run time to 0, the task sequence starts during the maintenance window. 维护时段关闭后,它将继续运行,直到完成或失败。It continues to run until it completes or fails after the maintenance window is closed. 因此,最大运行时间设置为“0”的任务序列可能运行到维护时段结束后。As a result, task sequences with a maximum run time set to 0 might run past the end of their maintenance windows. 如果将最大运行时间设置为具体时段(不为“0”),且此时段大于任何可用维护时段的长度,那么该任务序列不会运行。If you set the maximum run time to a specific period (non-zero) that exceeds the length of any available maintenance window, then that task sequence doesn't run. 有关详细信息,请参阅如何使用维护时段For more information, see How to use maintenance windows.

      如果值设置为“0”,则 Configuration Manager 会将最大允许运行时间计算为 12 小时(720 分钟)以监视进度。If you set the value as 0, Configuration Manager evaluates the maximum allowed run time as 12 hours (720 minutes) for monitoring progress. 但是,只要倒计时持续时间不超过维护时段值,任务序列便会启动。However, the task sequence starts as long as the countdown duration doesn't exceed the maintenance window value.

      备注

      当它达到最大运行时间时,如果你不允许用户与必需部署进行交互,Configuration Manager 就会停止此任务序列。When it reaches the maximum run time, if you don't allow users to interact with a required deployment, then Configuration Manager stops the task sequence. 如果任务序列本身未停止,则达到最大允许运行时间后,Configuration Manager 将停止监视任务序列。If the task sequence itself isn't stopped, Configuration Manager stops monitoring the task sequence after it reaches the maximum allowed run time.

    • 使用启动映像:可在运行任务序列时使用选定的启动映像。Use a boot image: Use the selected boot image when the task sequence is run. 选择“浏览”可选择其他启动映像。Select Browse to select a different boot image. 清除此选项,可在运行任务序列时禁用选定的启动映像。Clear this option to disable the use of the selected boot image when the task sequence runs.

    • 此任务序列可以在任何平台上运行:如果选择此选项,则 Configuration Manager 在任务序列运行时不会检查目标计算机的平台类型。This task sequence can run on any platform: If you select this option, Configuration Manager doesn't check the platform type of the destination computer when the task sequence runs. 默认情况下选择此选项。This option is selected by default.

    • 此任务序列仅可以在指定的客户端平台上运行:此选项指定此任务序列可以在其上运行的处理器、OS 版本和服务包。This task sequence can only run on the specified client platforms: This option specifies the processors, OS versions, and service packs on which this task sequence can run. 选择此选项时,还必须从列表中至少选择一个平台。When you select this option, select at least one platform from the list. 默认情况下不选择任何平台。By default, no platforms are selected. Configuration Manager 在评估集合中的哪些目标计算机将接收部署的任务序列时,使用此信息。Configuration Manager uses this information when is evaluates which destination computers in a collection receive the deployed task sequence.

      备注

      从启动媒体或 PXE 运行任务序列时,Configuration Manager 将忽略此选项。When you run a task sequence from boot media or PXE, Configuration Manager ignores this option. 任务序列的运行方式就如同“此程序可以在任何平台上运行”选项处于选中状态。The task sequence runs as though the option This program can run on any platform is selected.

“影响重大”设置High-impact settings

将任务序列配置为“影响重大”,并自定义用户在运行任务序列时收到的消息。Configure a task sequence as high-impact and customize the messages that users receive when they run the task sequence.

警告

如果使用 PXE 部署,并在配置设备硬件时将网络适配器作为第一个启动设备,则这些设备可以自动启动 OS 部署任务序列而无需用户交互。If you use PXE deployments, and configure device hardware with the network adapter as the first boot device, these devices can automatically start an OS deployment task sequence without user interaction. 部署验证不会管理此配置。Deployment verification doesn't manage this configuration. 尽管此配置可以简化流程并减少用户交互,但它会增加设备意外重置映像的风险。While this configuration may simplify the process and reduce user interaction, it puts the device at greater risk for accidental reimage.

将任务序列设置为影响重大的任务序列Set a task sequence as a high-impact task sequence

使用下列过程将任务序列设置为“影响重大”。Use the following procedure to set a task sequence as high-impact.

备注

任何符合特定条件的任务序列都将自动定义为“影响重大”。Any task sequence that meets certain conditions is automatically defined as high-impact. 有关详细信息,请参阅管理高风险部署For more information, see Manage high-risk deployments.

  1. 在 Configuration Manager 工作区中,转到“软件库”工作区,展开“操作系统”,选择“任务序列” 。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and select Task Sequences.

  2. 选择要编辑的任务序列,然后选择“属性”。Select the task sequence to edit, and select Properties.

  3. 在“用户通知”选项卡上,选择“这是影响重大的任务序列”。On the User Notification tab, select This is a high-impact task sequence.

创建高风险部署的自定义通知Create a custom notification for high-risk deployments

使用以下过程为影响重大的部署创建自定义通知。Use the following procedure to create a custom notification for high-impact deployments.

  1. 在 Configuration Manager 工作区中,转到“软件库”工作区,展开“操作系统”,选择“任务序列” 。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and select Task Sequences.

  2. 选择要编辑的任务序列,然后选择“属性”。Select the task sequence to edit, and select Properties.

  3. 在“用户通知”选项卡上,选择“使用自定义文本”。On the User Notification tab, select Use custom text.

    备注

    只能在已选择选项“这是影响重大的任务序列”时设置用户通知文本。You can only set user notification text when you select the option, This is a high-impact task sequence.

  4. 配置下列设置:Configure the following settings:

    备注

    每个文本框的最大限制为 255 个字符。Each text box has a maximum limit of 255 characters.

    • 用户通知标题文本:指定在软件中心用户通知上显示的蓝色文本。User notification headline text: Specifies the blue text that displays on the Software Center user notification. 例如,在默认用户通知中,本部分包含“确认想要升级此计算机上的操作系统”。For example, in the default user notification, this section contains "Confirm you want to upgrade the operating system on this computer."

    • 用户通知消息文本:三个文本框提供自定义通知的正文。User notification message text: There are three text boxes that provide the body of the custom notification. 所有文本框都需要添加文本。All text boxes require that you add text.

      • 第一个文本框:指定文本的主要正文,通常包含针对用户的说明。First text box: Specifies the main body of text, typically containing instructions for the user. 例如,在默认用户通知中,本部分包含“操作系统升级需要一些时间,并且计算机可能会多次重启”。For example, in the default user notification, this section contains "Upgrading the operating system takes time and your computer might restart several times."

      • 第二个文本框:指定文本主要正文下的粗体文本。Second text box: Specifies the bold text under the main body of text. 例如,在默认用户通知中,本部分包含“此就地升级将安装新的操作系统并自动迁移你的应用、数据和设置”。For example, in the default user notification, this section contains "This in-place upgrade installs the new operating system and automatically migrates your apps, data, and settings."

      • 第三个文本框:指定粗体文本下的最后一行文本。Third text box: Specifies the last line of text under the bold text. 例如,在默认用户通知中,本部分包含“单击‘安装’以开始。For example, in the default user notification, this section contains "Click Install to begin. 否则,单击‘取消’”的内容。Otherwise, click Cancel."

示例Example

假设在属性中配置以下自定义通知。Let's say you configure the following custom notification in properties.

任务序列属性的自定义“用户通知”选项卡

当最终用户从软件中心打开安装时,将显示以下通知消息。The following notification message displays when the end user opens the installation from Software Center.

软件中心中面向最终用户的自定义任务序列通知

电源计划的性能改进Performance improvements for power plans

从版本 1910 开始,现在可以使用高性能电源计划运行任务序列。Starting in version 1910, you can now run a task sequence with the high performance power plan. 此选项可提高任务序列的总体速度。This option improves the overall speed of the task sequence. 它将 Windows 配置为使用其内置的高性能电源计划,该计划提供最高性能,但电源消耗会变高。It configures Windows to use its built-in high performance power plan, which delivers maximum performance at the expense of higher power consumption. 对于新的任务序列,此选项默认启用。This option is on by default for new task sequences.

启动任务序列后,在大多数情况下会记录当前启用的电源计划。When the task sequence starts, in most scenarios it records the currently enabled power plan. 然后,会将当前电源计划切换到 Windows 默认高性能计划。It then switches the active power plan to the Windows default High Performance plan. 如果任务序列重新启动计算机,则会重复此过程。If the task sequence restarts the computer, it repeats this process. 在任务序列结束时,会将电源计划重置为存储的值。At the end of the task sequence, it resets the power plan to the stored value. 此功能适用于 Windows 和 Windows PE,但不影响虚拟机。This functionality works in both Windows and Windows PE, but has no impact on virtual machines.

  • 如果在 Windows PE 中启动任务序列,则该任务序列不会记录当前启用的电源计划以供后续重用。If the task sequence starts in Windows PE, the task sequence doesn't record the currently enabled power plan for later reuse.

  • 重置计算机映像(擦除和加载)的 OS 部署任务序列不会保留旧版 OS 的电源计划设置。An OS deployment task sequence that reimages the computer (wipe and load) doesn't preserve the power plan setting of the old OS. 任务序列结束时,它会还原默认的“均衡”电源计划。At the end of the task sequence, it restores the default Balanced power plan.

重要

若要利用 Configuration Manager 的此项新功能,更新站点后,请将客户端更新到最新版本。To take advantage of this new Configuration Manager feature, after you update the site, update clients to the latest version. 另请更新启动映像以包含最新的客户端组件。Also update boot images to include the latest client components. 尽管在更新站点和控制台时 Configuration Manager 控制台中会显示新功能,但只有在客户端版本也是最新版本之后,完整方案才能正常运行。While new functionality appears in the Configuration Manager console when you update the site and console, the complete scenario isn't functional until the client version is also the latest.

  1. 在 Configuration Manager 控制台中,转到“软件库”工作区。In the Configuration Manager console, go to the Software Library workspace. 展开“操作系统”,然后选择“任务序列”节点 。Expand Operating Systems, and select the Task Sequences node.

  2. 创建或选择现有任务序列,然后选择“属性”。Create or choose an existing task sequence, and then select Properties.

  3. 切换到“性能”选项卡。Switch to the Performance tab.

  4. 启用“作为高性能电源计划运行”选项。Enable the option to Run as high performance power plan.

警告

请注意低性能硬件上的此设置。Be cautious with this setting on low performance hardware. 长时间运行大量系统操作可能会损伤低端硬件。Running intense system operations for an extended period of time can strain low-end hardware. 与硬件制造商联系以获取具体指导。Check with your hardware manufacturer for specific guidance.

已知问题Known issue

通常,在你更改任务序列属性中的设置时,它会更新所有现有部署。Usually, when you change settings in task sequence properties, it updates all existing deployments. 当你在任务序列属性中更改此性能设置时,它不会影响任务序列的任何现有部署。When you change this performance setting in the task sequence properties, it doesn't affect any existing deployments of the task sequence. 要启用或禁用此设置以提高性能,请创建新的任务序列部署。To enable or disable this setting for high performance, create a new task sequence deployment.

分发引用的内容Distribute referenced content

在客户端运行引用内容的任务序列之前,将该内容分发到分发点。Before clients run a task sequence that references content, distribute that content to distribution points. 你可以随时选择任务序列并分发其内容,以便为分发建立一个新的引用包列表。At any time, you can select the task sequence and distribute its content to build a new list of reference packages for distribution. 如果使用更新的内容更改任务序列,则在内容可供客户端使用之前重新分发此内容。If you make changes to the task sequence with updated content, redistribute the content before it's available to clients. 使用以下过程来分发任务序列引用的内容。Use the following procedure to distribute the content that is referenced by a task sequence.

将引用的内容分发到分发点的过程Process to distribute referenced content to distribution points

  1. 在 Configuration Manager 控制台中,转到“软件库”工作区,展开“操作系统”,然后选择“任务序列”节点。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and then select the Task Sequences node.

  2. 在“任务序列”列表中,选择要分发的任务序列。In the Task Sequence list, select the task sequence that you want to distribute.

  3. 在功能区的“主页”选项卡上,在“部署”组中,选择“分发内容”。On the Home tab of the ribbon, in the Deployment group, select Distribute Content. 此操作会启动“分发内容向导”。This action starts the Distribute Content Wizard.

  4. 在“常规”页上,验证是否为分发选择了正确的任务序列。On the General page, verify that the correct task sequence is selected for distribution.

  5. 在“内容”页上,验证要分发的内容(例如任务序列引用的启动映像)。On the Content page, verify the content to distribute, such as the boot image referenced by the task sequence.

  6. 在“内容目标”页上,指定要在其中分发任务序列内容的集合、分发点或分发点组。On the Content Destination page, specify the collections, distribution point, or distribution point group where you want to distribute the task sequence contents.

    重要

    如果所选任务序列引用已分发到特定分发点的内容,则向导不会列出该分发点。If the task sequence that you selected references content that's already distributed to a specific distribution point, the wizard doesn't list that distribution point.

  7. 完成向导。Complete the wizard.

还可以预留任务序列中引用的内容。You can also prestage the content referenced in the task sequence. Configuration Manager 创建压缩的预安排内容文件,该文件包含所选内容的文件、关联依赖项和关联元数据。Configuration Manager creates a compressed, prestaged content file that contains the files, associated dependencies, and associated metadata for the content that you select. 然后在站点服务器、辅助站点或分发点中手动导入内容。Then you manually import the content at a site server, secondary site, or distribution point. 有关如何预留内容文件的详细信息,请参阅预留内容For more information about how to prestage content files, see Prestage content.

部署Deploy

有关详细信息,请参阅 Deploy a task sequenceFor more information, see Deploy a task sequence.

导出和导入Export and import

导出和导入任务序列(包含或不包含相关对象)。Export and import task sequences with or without their related objects. 此引用的内容包括以下对象:This referenced content includes the following objects:

  • OS 映像OS images
  • 启动映像Boot images
  • 包(如客户端安装包)Packages like the client install package
  • 驱动程序包Driver packages
  • 具有依赖项的应用程序Applications with dependencies

导出和导入任务序列时,请考虑以下几点:Consider the following points when you export and import task sequences:

  • Configuration Manager 不会在任务序列中导出密码。Configuration Manager doesn't export passwords in the task sequence. 如果导出和导入包含密码的任务序列,则编辑导入的任务序列,以重新输入任何密码。If you export and import a task sequence that contains passwords, edit the imported task sequence to reenter any passwords. 请查看以下可能包含密码的步骤:Review the following steps that may include a password:

  • 使用“设置动态变量”步骤导出任务序列时,Configuration Manager 不会为配置了“机密值”设置的变量导出值。When you export a task sequence with the Set Dynamic Variables step, Configuration Manager doesn't export values for variables that you configure with the Secret value setting. 导入任务序列后,请重新输入这些变量的值。Reenter the values for these variables after you import the task sequence.

  • 如果你具有多个主站点,请在管理中心站点导入任务序列。When you have multiple primary sites, import task sequences at the central administration site.

导出任务序列的过程Process to export task sequences

  1. 在 Configuration Manager 控制台中,转到“软件库”工作区,展开“操作系统”,然后选择“任务序列”节点。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and then select the Task Sequences node.

  2. 在“任务序列”列表中,选择要导出的任务序列。In the Task Sequence list, select the task sequences that you want to export. 如果选择多个任务序列,它们将全部存储在一个导出文件上。If you select more than one task sequence, they're all stored in one export file.

  3. 在功能区的“主页”选项卡上,在“任务序列”组中,选择“导出” 。On the Home tab of the ribbon, in the Task Sequence group, select Export. 此操作会启动“导出任务序列向导”。This action starts the Export Task Sequence Wizard.

  4. 在“常规” 页上,指定下列设置:On the General page, specify the following settings:

    • 文件:指定导出文件的位置和名称。File: Specify the location and name of the export file. 如果直接输入文件名,请确保在文件名中包括 .zip 扩展名。If you enter the file name directly, be sure to include the .zip extension to the file name. 如果浏览导出文件,则向导会自动添加此文件扩展名。If you browse for the export file, the wizard automatically adds this file name extension.

    • 如果不想导出任务序列依赖项,请取消选中“导出所有任务序列依赖项”选项。If you don't want to export task sequence dependencies, deselect the option to Export all task sequence dependencies. 默认情况下,向导会扫描所有相关对象并与任务序列一起导出它们。By default, the wizard scans for all the related objects and exports them with the task sequence. 这包括应用程序的任何依赖项。These dependencies include any for applications.

    • 如果不想将包源中的内容复制到导出位置,请取消选中“导出所选任务序列和依赖项的所有内容”选项。If you don't want to copy the content from the package source to the export location, deselect the option to Export all content for the selected task sequences and dependencies. 如果选择此选项,“导入任务序列向导”会使用导入路径作为新包源位置。If you select this option, the Import Task Sequence Wizard uses the import path as the new package source location.

    • 管理员备注:添加要导出的任务序列的说明。Administrator comments: Add a description of the task sequences to export.

  5. 完成向导。Complete the wizard.

该向导会创建以下输出文件:The wizard creates the following output files:

  • 如果不导出内容,则为一个 .zip 文件。If you don't export content: a .zip file.

  • 如果导出内容,则为一个 .zip 文件和一个名为 export_files 的文件夹,其中 export 是包含导出内容的 .zip 文件的名称。If you export content: a .zip file and a folder named export_files, where export is the name of the .zip file that contains the exported content.

如果导出任务序列时包括内容,请确保复制 .zip 文件和 export_files 文件夹,否则导入将失败。If you include content when you export a task sequence, make sure that you copy the .zip file and the export_files folder, or the import fails.

导入任务序列的过程Process to import task sequences

  1. 在 Configuration Manager 控制台中,转到“软件库”工作区,展开“操作系统”,然后选择“任务序列”节点。In the Configuration Manager console, go to the Software Library workspace, expand Operating Systems, and then select the Task Sequences node.

  2. 在功能区的“主页”选项卡上,在“创建”组中,选择“导入任务序列” 。On the Home tab of the ribbon, in the Create group, select Import Task Sequence. 此操作会启动“导入任务序列向导”。This action starts the Import Task Sequence Wizard.

  3. 在功能区的“常规”页上,指定导出的 .zip 文件。On the General page of the ribbon, specify the exported .zip file.

  4. 在“文件内容”页上,为要导入的每个对象选择所需的操作。On the File Content page, select the action that you require for each object that you import. 此页显示已找到的 Configuration Manager 要导入的所有对象。This page shows all the objects that Configuration Manager found to import.

    • 如果从未导入对象,请选择“新建”。If the object has never been imported, select Create New.

    • 如果以前导入过对象,请选择下列操作之一:If the object has been previously imported, select one of the following actions:

      • 忽略重复项(默认值):此操作不导入对象。Ignore Duplicate (default): This action doesn't import the object. 而是由向导将现有对象链接到任务序列。Instead, the wizard links the existing object to the task sequence.

      • 覆盖:此操作用导入的对象覆盖现有对象。Overwrite: This action overwrites the existing object with the imported object. 对于应用程序,你可以添加修订以更新现有应用程序或创建新应用程序。For applications, you can add a revision to update the existing application or create a new application.

  5. 完成向导。Complete the wizard.

导入任务序列之后,请编辑任务序列以指定原始任务序列中的任何密码。After you import the task sequence, edit the task sequence to specify any passwords that were in the original task sequence. 出于安全原因,不会导出密码。For security reasons, passwords aren't exported.

发生故障时返回到上一页面Return to previous page on failure

如果运行任务序列时发生故障,可以返回到任务序列向导的上一页面。When you run a task sequence, and there's a failure, you can return to a previous page of the task sequence wizard. 在以前版本的 Configuration Manager 中,出现故障时必须重启任务序列。In prior versions of Configuration Manager, you had to restart the task sequence when there was a failure. 在以下应用场景中使用“上一页”按钮:Use the Previous button in the following scenarios:

  • 当计算机在 Windows PE 中启动时,任务序列可用之前可能会先显示任务序列启动对话框。When a computer starts in Windows PE, the task sequence bootstrap dialog might display before the task sequence is available. 在此应用场景中选择“下一步”时,会显示任务序列的最后一页,同时显示一条消息,指示无可用的任务序列。When you select Next in this scenario, the final page of the task sequence displays with a message that there are no task sequences available. 现在,可选择“上一页”以再次搜索可用任务序列。Now, you can select Previous to search again for available task sequences. 在出现可用任务序列之前,可重复此过程。You can repeat this process until the task sequence is available.

  • 运行任务序列但分发点上尚无可用从属内容包时,任务序列会失败。When you run a task sequence, but dependent content packages aren't available yet on distribution points, the task sequence fails. 如果缺少的内容尚未分发,请立即将其分发。If the missing content wasn't distributed yet, distribute it now. 或等待分发点提供该内容。Or wait for the content to be available on distribution points. 然后选择“上一页”,让任务序列再次搜索该内容。Then select Previous to have the task sequence search again for the content.

集合和设备变量Collection and device variables

可以为计算机和集合定义自定义的任务序列变量。You can define custom task sequence variables for computers and collections. 为计算机定义的变量称为特定于计算机的任务序列变量。Variables that you define for a computer are referred to as per-computer task sequence variables. 为集合定义的变量称为特定于集合的任务序列变量。Variables defined for a collection are referred to as per-collection task sequence variables. 有关详细信息,请参阅集合和设备变量For more information, see Collection and device variables.

其他操作Additional actions

选择任务序列时,可以使用其他操作来管理任务序列。You can manage task sequences by using additional actions when you select a task sequence.

编辑Edit

有关详细信息,请参阅使用任务序列编辑器For more information, see Use the task sequence editor.

启用Enable

启用任务序列,以便其能在客户端运行。Enables the task sequence so that clients can run it. 不需要在启用后重新部署任务序列。You don't need to redeploy a task sequence after it's enabled.

禁用Disable

禁用任务序列,使其无法在计算机上运行。Disables the task sequence so that it can't run on computers. 可以部署禁用的任务序列,但在启用之前计算机不会运行任务序列。You can deploy a disabled task sequence, but computers don't run the task sequence until you enable it.

导出Export

有关详细信息,请参阅导出和导入任务序列For more information, see Export and import task sequences.

复制Copy

为所选的任务序列创建副本。Makes a copy of the selected task sequence. 在根据现有任务序列创建新的任务序列时,此操作很有用。This action is useful to create a new task sequence that's based on an existing task sequence.

为某个文件夹中的任务序列创建副本时,副本会在该文件夹中列出,直至你刷新任务序列节点为止。When you make a copy of a task sequence in a folder, the copy is listed in that folder until you refresh the task sequence node. 刷新后,副本将出现在根文件夹中。After the refresh, the copy appears in the root folder.

刷新Refresh

刷新所选任务序列的详细信息。Refreshes the details for the selected task sequence.

删除Delete

删除所选的任务序列。Deletes the selected task sequence.

创建分阶段部署Create Phased Deployment

有关详细信息,请参阅创建分阶段部署For more information, see Create phased deployments.

部署Deploy

有关详细信息,请参阅 Deploy a task sequenceFor more information, see Deploy a task sequence.

分发内容Distribute Content

启动“分发内容向导”将引用的内容发送到分发点。Starts the Distribute Content Wizard to send the referenced content to distribution points.

创建预留的内容文件Create Prestaged Content File

启动“创建预留的内容文件向导”以预留任务序列内容。Starts the Create Prestaged Content File Wizard to prestage the task sequence content. 有关如何创建预留的内容文件的信息,请参阅预安排内容For information about how to create a prestaged content file, see Prestage content.

移动Move

将所选的任务序列移动到“任务序列”节点中的另一个文件夹。Moves the selected task sequence to another folder in the Task Sequences node.

设置安全作用域Set Security Scopes

选择所选任务序列的安全作用域。Select the security scopes for the selected task sequence. 有关详细信息,请参阅 安全作用域For more information, see Security scopes.

属性Properties

有关详细信息,请参阅配置软件中心属性配置高级任务序列设置For more information, see Configure Software Center properties and Configure advanced task sequence settings.

查看View

从版本 1902 开始,任务序列上的“查看”操作是默认设置。Starting in version 1902, the View action on task sequences is the default. 通过此操作可以查看任务序列的步骤,而无需将其锁定以进行编辑。This action lets you see the steps of the task sequence without locking it for editing. 有关详细信息,请参阅使用任务序列编辑器For more information, see Use the task sequence editor.

另请参阅See also