任务序列变量Task sequence variables

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

本文是按字母顺序对所有可用变量的引用。This article is a reference for all of the available variables in alphabetical order. 使用浏览器的查找功能(通常使用 CTRL + F)查找特定变量。Use the browser Find function (typically CTRL + F ) to find a specific variable. 如果变量特定于特定步骤,会对此进行说明。The variable notes if it's specific to particular step. 有关任务序列步骤的文章包括特定于每个步骤的变量列表。The article on task sequence steps includes the list of variables specific to each step.

有关详细信息,请参阅使用任务序列变量For more information, see Using task sequence variables.

任务序列变量引用Task sequence variable reference

_OSDDetectedWinDir_OSDDetectedWinDir

在 Windows PE 启动时,任务序列会在计算机的硬盘驱动器上扫描是否以前已安装操作系统。The task sequence scans the computer's hard drives for a previous operating system installation when Windows PE starts. Windows 文件夹位置存储在此变量中。The Windows folder location is stored in this variable. 你可以将任务序列配置为从环境中检索该值,并将其用于指定相同的 Windows 文件夹位置进行新的操作系统安装。You can configure your task sequence to retrieve this value from the environment and use it to specify the same Windows folder location to use for the new operating system installation.

_OSDDetectedWinDrive_OSDDetectedWinDrive

在 Windows PE 启动时,任务序列会在计算机的硬盘驱动器上扫描是否以前已安装操作系统。The task sequence scans the computer's hard drives for a previous operating system installation when Windows PE starts. 安装操作系统的硬盘驱动器位置存储在此变量中。The hard drive location for where the operating system is installed is stored in this variable. 你可以将任务序列配置为从环境中检索该值,并将其用于指定相同的硬盘驱动器位置以供新的操作系统使用。You can configure your task sequence to retrieve this value from the environment and use it to specify the same hard drive location to use for the new operating system.

_OSDMigrateUsmtPackageID_OSDMigrateUsmtPackageID

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

指定包含 USMT 文件的 Configuration Manager 包的包 ID。Specifies the package ID of the Configuration Manager package that contains the USMT files. 此变量是必需的。This variable is required.

_OSDMigrateUsmtRestorePackageID_OSDMigrateUsmtRestorePackageID

适用于还原用户状态步骤。Applies to the Restore User State step.

(input)(input)

指定包含 USMT 文件的 Configuration Manager 包的包 ID。Specifies the package ID of the Configuration Manager package that contains the USMT files. 此变量是必需的。This variable is required.

_SMSTSAdvertID_SMSTSAdvertID

存储当前运行的任务序列部署的唯一 ID。Stores the current running task sequence deployment unique ID. 它使用与 Configuration Manager 软件分发部署 ID 相同的格式。It uses the same format as a Configuration Manager software distribution deployment ID. 如果任务序列从独立的媒体运行,则此变量未定义。If the task sequence is running from stand-alone media, this variable is undefined.

示例Example

ABC20001

_SMSTSAssetTag_SMSTSAssetTag

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机的资产标记。Specifies the asset tag for the computer.

_SMSTSBootImageID_SMSTSBootImageID

如果当前运行的任务序列引用某个启动映像包,此变量会存储启动映像包 ID。If the current running task sequence references a boot image package, this variable stores the boot image package ID. 如果任务序列不引用启动映像包,则不会设置此变量。If the task sequence doesn't reference a boot image package, this variable isn't set.

示例Example

ABC00001

_SMSTSBootUEFI_SMSTSBootUEFI

当任务序列检测到计算机处于 UEFI 模式时,它会设置此变量。The task sequence sets this variable when it detects a computer that's in UEFI mode.

_SMSTSClientCache_SMSTSClientCache

当任务序列将内容缓存在本地驱动器上时,会设置此变量。The task sequence sets this variable when it caches content on the local drive. 该变量包含指向缓存的路径。The variable contains the path to the cache. 如果此变量不存在,则无缓存。If this variable doesn't exist, then there's no cache.

_SMSTSClientGUID_SMSTSClientGUID

存储 Configuration Manager 客户端 GUID 的值。Stores the value of Configuration Manager client GUID. 如果任务序列从独立的媒体运行,则此变量未设置。If the task sequence is running from standalone media, this variable isn't set.

示例Example

0a1a9a4b-fc56-44f6-b7cd-c3f8ee37c04c

_SMSTSCurrentActionName_SMSTSCurrentActionName

指定当前运行的任务序列步骤的名称。Specifies the name of the currently running task sequence step. 此变量在任务序列管理器运行每个单独步骤前设置。This variable is set before the task sequence manager runs each individual step.

示例Example

run command line

_SMSTSDefaultGateways_SMSTSDefaultGateways

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机使用的默认网关。Specifies the default gateways used by the computer.

_SMSTSDownloadOnDemand_SMSTSDownloadOnDemand

如果当前的任务序列正在按需下载模式下运行,则此变量为 trueIf the current task sequence is running in download-on-demand mode, this variable is true. 按需下载模式是指任务序列管理器仅在必须访问内容时本地下载内容。Download-on-demand mode means the task sequence manager downloads content locally only when it must access the content.

_SMSTSInWinPE_SMSTSInWinPE

如果当前的任务序列步骤正在 Windows PE 中运行,则此变量为 trueWhen the current task sequence step is running in Windows PE, this variable is true. 测试此任务序列变量以确定当前的操作系统环境。Test this task sequence variable to determine the current OS environment.

_SMSTSIPAddresses_SMSTSIPAddresses

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机使用的 IP 地址。Specifies the IP addresses used by the computer.

_SMSTSLastActionName_SMSTSLastActionName

存储运行的最后一个操作的名称。Stores the name of the last action that was run. 此变量与 _SMSTSLastActionRetCode 相关。This variable relates to _SMSTSLastActionRetCode. 任务序列将这些值记录到 smsts.log 文件中。The task sequence logs these values to the smsts.log file. 对任务序列进行故障排除时,此变量十分有用。This variable is beneficial when troubleshooting a task sequence. 当步骤失败时,自定义脚本可以包含步骤名称和返回代码。When a step fails, a custom script can include the step name along with the return code.

_SMSTSLastActionRetCode_SMSTSLastActionRetCode

存储源自所运行的上一操作的返回代码。Stores the return code from the last action that was run. 此变量可作为决定下一步是否运行的条件。This variable can be used as a condition to determine if the next step is run.

示例Example

0

_SMSTSLastActionSucceeded_SMSTSLastActionSucceeded

  • 如果最后一个步骤成功,此变量为 trueIf the last step succeeded, this variable is true.

  • 如果最后一个步骤失败,此变量为 falseIf the last step failed, it's false.

  • 如果由于该步骤被禁用或相关的条件被评估为 false 而导致任务序列跳过最后一个操作,则不会重置此变量。If the task sequence skipped the last action, because the step is disabled or the associated condition evaluated to false , this variable isn't reset. 它仍保留之前操作的值。It still holds the value for the previous action.

_SMSTSLastContentDownloadLocation_SMSTSLastContentDownloadLocation

从版本 1906 开始,此变量包含下载任务序列或尝试下载内容的最后位置。Starting in version 1906, this variable contains the last location where the task sequence downloaded or attempted to download content. 检查此变量,而不是分析此内容位置的客户端日志。Inspect this variable instead of parsing the client logs for this content location.

_SMSTSLaunchMode_SMSTSLaunchMode

通过以下方法之一指定启动的任务序列:Specifies that the task sequence started via one of the following methods:

  • SMS :Configuration Manager 客户端,例如当用户从软件中心启动它SMS : The Configuration Manager client, such as when a user starts it from Software Center
  • UFD :传统 USB 媒体UFD : Legacy USB media
  • UFD + FORMAT :新版 USB 媒体UFD+FORMAT : Newer USB media
  • CD :可启动的 CDCD : A bootable CD
  • DVD :可启动的 DVDDVD : A bootable DVD
  • PXE :使用 PXE 进行网络启动PXE : Network boot with PXE
  • HD :硬盘上的预留媒体HD : Prestaged media on a hard disk

_SMSTSLogPath_SMSTSLogPath

存储日志目录的完整路径。Stores the full path of the log directory. 使用此值确定任务序列步骤记录其操作的位置。Use this value to determine where the task sequence steps log their actions. 如果没有硬盘驱动器可用,则不设置此值。This value isn't set when a hard drive isn't available.

_SMSTSMacAddresses_SMSTSMacAddresses

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机使用的 MAC 地址。Specifies the MAC addresses used by the computer.

_SMSTSMachineName_SMSTSMachineName

存储并指定计算机名称。Stores and specifies the computer name. 存储任务序列将用于记录所有状态消息的计算机的名称。Stores the name of the computer that the task sequence uses to log all status messages. 要更改新操作系统中的计算机名称,请使用 OSDComputerName 变量。To change the computer name in the new OS, use the OSDComputerName variable.

_SMSTSMake_SMSTSMake

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机的品牌。Specifies the make of the computer.

_SMSTSMDataPath_SMSTSMDataPath

指定由 SMSTSLocalDataDrive 变量定义的路径。Specifies the path defined by the SMSTSLocalDataDrive variable. 此路径指定了运行任务序列时在目标计算机上保存临时缓存文件的位置。This path specifies where the task sequence stores temporary cache files on the destination computer while it's running. 当在启动任务序列前定义 SMSTSLocalDataDrive 时,例如设置集合变量,启动任务序列后,Configuration Manager 将定义 _SMSTSMDataPath 变量。When you define SMSTSLocalDataDrive before the task sequence starts, such as by setting a collection variable, Configuration Manager then defines the _SMSTSMDataPath variable once the task sequence starts.

_SMSTSMediaType_SMSTSMediaType

指定用于启动安装的媒体类型。Specifies the type of media that's used to initiate the installation. 媒体类型示例有启动媒体、完全媒体、PXE 和预暂存媒体。Examples of types of media are Boot Media, Full Media, PXE, and Prestaged Media.

_SMSTSModel_SMSTSModel

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机的型号。Specifies the model of the computer.

_SMSTSMP_SMSTSMP

存储 Configuration Manager 管理点的 URL 或 IP 地址。Stores the URL or IP address of a Configuration Manager management point.

_SMSTSMPPort_SMSTSMPPort

存储 Configuration Manager 管理点的端口号。Stores the port number of a Configuration Manager management point.

_SMSTSOrgName_SMSTSOrgName

存储任务序列在进度对话框中显示的品牌标题名称。Stores the branding title name that the task sequence displays in the progress dialog.

_SMSTSOSUpgradeActionReturnCode_SMSTSOSUpgradeActionReturnCode

适用于升级操作系统步骤。Applies to the Upgrade operating system step.

存储 Windows 安装程序返回的用于指示成功或失败的退出代码值。Stores the exit code value that Windows Setup returns to indicate success or failure. 此变量可与 /Compat 命令行选项结合使用。This variable is useful with the /Compat command-line option.

示例Example

在仅限兼容性扫描完成时,可以根据失败或成功退出代码在后续步骤中执行操作。On the completion of a compat-only scan, take action in later steps depending on the failure or success exit code. 成功时,可以启动升级。On success, initiate the upgrade. 或者在环境中设置一个标记来收集硬件清单。Or set a marker in the environment to collect with hardware inventory. 例如,添加文件或设置注册表项。For example, add a file or set a registry key. 该标记可以用于创建准备好进行升级或在升级之前需要执行操作的计算机集合。Use this marker to create a collection of computers that are ready to upgrade, or that require action before upgrade.

_SMSTSPackageID_SMSTSPackageID

存储当前运行的任务序列的 ID。Stores the current running task sequence ID. 此 ID 使用与 Configuration Manager 包 ID 相同的格式。This ID uses the same format as a Configuration Manager package ID.

示例Example

HJT00001

_SMSTSPackageName_SMSTSPackageName

存储当前运行的任务序列的名称。Stores the current running task sequence name. 创建任务序列时,由 Configuration Manager 管理员指定此名称。A Configuration Manager administrator specifies this name when creating the task sequence.

示例Example

Deploy Windows 10 task sequence

_SMSTSRunFromDP_SMSTSRunFromDP

如果当前任务序列在从分发点运行模式下运行,设置为 trueSet to true if the current task sequence is running in run-from-distribution-point mode. 此模式意味着任务序列管理器将从分发点获取所需的包共享。This mode means the task sequence manager obtains required package shares from distribution point.

_SMSTSSerialNumber_SMSTSSerialNumber

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机的序列号。Specifies the serial number of the computer.

_SMSTSSetupRollback_SMSTSSetupRollback

指定 Windows 安装程序是否在就地升级期间执行回滚操作。Specifies whether Windows Setup performed a rollback operation during an in-place upgrade. 变量值可以是 truefalseThe variable values can be true or false.

_SMSTSSiteCode_SMSTSSiteCode

存储 Configuration Manager 站点的站点代码。Stores the site code of the Configuration Manager site.

示例Example

ABC

_SMSTSTimezone_SMSTSTimezone

此变量用以下格式存储时区信息:This variable stores the time zone information in the following format:

Bias,StandardBias,DaylightBias,StandardDate.wYear,wMonth,wDayOfWeek,wDay,wHour,wMinute,wSecond,wMilliseconds,DaylightDate.wYear,wMonth,wDayOfWeek,wDay,wHour,wMinute,wSecond,wMilliseconds,StandardName,DaylightName

示例Example

对于时区东部时间(美国和加拿大):For the time zone Eastern Time (US and Canada) :

300,0,-60,0,11,0,1,2,0,0,0,0,3,0,2,2,0,0,0,Eastern Standard Time,Eastern Daylight Time

_SMSTSType_SMSTSType

指定当前运行的任务序列的类型。Specifies the type of the current running task sequence. 可以具有以下一个值:It can have one of the following values:

  • 1 :一般任务序列1 : A generic task sequence
  • 2 :OS 部署任务序列2 : An OS deployment task sequence

_SMSTSUseCRL_SMSTSUseCRL

此变量指定在使用 HTTPS 与管理点通信时,任务序列是否使用证书吊销列表 (CRL)。When the task sequence uses HTTPS to communicate with the management point, this variable specifies whether it uses the certificate revocation list (CRL).

_SMSTSUserStarted_SMSTSUserStarted

指定用户是否启动了任务序列。Specifies whether a user started the task sequence. 仅当任务序列从软件中心启动时设置此变量。This variable is set only if the task sequence is started from Software Center. 例如,如果 _SMSTSLaunchMode 设置为 SMSFor example, if _SMSTSLaunchMode is set to SMS.

此变量可以有下列值:This variable can have the following values:

  • true:指示任务序列通过用户从软件中心手动启动。true: Specifies that the task sequence is manually started by a user from Software Center.

  • false:指示任务序列由 Configuration Manager 计划程序自动启动。false: Specifies that the task sequence is initiated automatically by the Configuration Manager scheduler.

_SMSTSUseSSL_SMSTSUseSSL

指定任务序列是否使用 SSL 与 Configuration Manager 管理点通信。Specifies whether the task sequence uses SSL to communicate with the Configuration Manager management point. 如果为 HTTPS 配置站点系统,将值设置为 trueIf you configure your site systems for HTTPS, the value is set to true.

_SMSTSUUID_SMSTSUUID

适用于设置动态变量步骤。Applies to the Set Dynamic Variables step.

指定计算机的 UUID。Specifies the UUID of the computer.

_SMSTSWTG_SMSTSWTG

指定计算机是否作为 Windows To Go 设备运行。Specifies if the computer is running as a Windows To Go device.

_TS_CRMEMORY_TS_CRMEMORY

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最小内存(MB)”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Minimum memory (MB) check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRSPEED_TS_CRSPEED

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最小处理器速度(MHz)”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Minimum processor speed (MHz) check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRDISK_TS_CRDISK

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最小可用磁盘空间(MB)”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Minimum free disk space (MB) check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CROSTYPE_TS_CROSTYPE

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“要刷新的当前 OS 为”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Current OS to be refreshed is check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRARCH_TS_CRARCH

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“当前 OS 的体系结构”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Architecture of current OS check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRMINOSVER_TS_CRMINOSVER

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最低 OS 版本”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Minimum OS version check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRMAXOSVER_TS_CRMAXOSVER

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最高 OS 版本”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Maximum OS version check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRCLIENTMINVER_TS_CRCLIENTMINVER

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“最低客户端版本”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Minimum client version check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CROSLANGUAGE_TS_CROSLANGUAGE

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“当前 OS 的语言”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Language of current OS check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRACPOWER_TS_CRACPOWER

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“交流电源已接通”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the AC power plugged in check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRNETWORK_TS_CRNETWORK

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“网络适配器已连接”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Network adapter connected check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRUEFI_TS_CRUEFI

自版本 2006 起Starting in version 2006 适用于检查准备情况步骤。Applies to the Check Readiness step.

“计算机是否处于 UEFI 模式”的只读变量,返回 BIOS (0) 或 UEFI (1)。A read-only variable for whether the Computer is in UEFI mode returned BIOS (0) or UEFI (1). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TS_CRWIRED_TS_CRWIRED

从版本 2002 开始Starting in version 2002
适用于检查准备情况步骤。Applies to the Check Readiness step.

这是一个只读变量,用于指示“网络适配器不是无线网络”检查返回的是 true (1) 还是 false (0)。A read-only variable for whether the Network adapter is not wireless check returned true (1) or false (0). 如果未启用该检查,此只读变量的值将为空。If you don't enable the check, the value of this read-only variable is blank.

_TSAppInstallStatus_TSAppInstallStatus

任务序列在安装应用程序步骤中随应用程序的安装状态一起设置此变量。The task sequence sets this variable with the installation status for the application during the Install Application step. 它设置为下列值之一:It sets one of the following values:

  • Undefined :“安装应用程序”步骤未运行。Undefined : The Install Application step hasn't run.

  • 错误 :由于“安装应用程序”步骤中的错误,至少有一个应用程序失败。Error : At least one application failed because of an error during the Install Application step.

  • 警告 :在“安装应用程序”步骤中未发生任何错误。Warning : No errors occurred during the Install Application step. 由于不满足要求,一个或多个应用程序或必需的依赖项未安装。One or more applications, or a required dependency, didn't install because a requirement wasn't met.

  • 成功 :“安装应用程序”步骤中未检测到任何错误或警告。Success : There are no errors or warnings detected during the Install Application step.

_TSSecureBoot_TSSecureBoot

从版本 2002 开始Starting in version 2002

使用此变量可确定启用了 UEFI 的设备上安全启动的状态。Use this variable to determine the state of secure boot on a UEFI-enabled device. 变量可以具有下列值之一:The variable can have one of the following values:

  • NA:关联的注册表值不存在,这意味着设备不支持安全启动。NA: The associated registry value doesn't exist, which means the device doesn't support secure boot.
  • Enabled:设备已启用安全启动。Enabled: The device has secure boot enabled.
  • Disabled:设备已禁用安全启动。Disabled: The device has secure boot disabled.

OSDAdapterOSDAdapter

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

此任务序列变量是一个数组变量。This task sequence variable is an array variable. 数组中的每个元素都代表计算机上单个网络适配器的设置。Each element in the array represents the settings for a single network adapter on the computer. 通过将数组变量名称与基于零的网络适配器下标及属性名称组合,访问每个适配器的设置。Access the settings for each adapter by combining the array variable name with the zero-based network adapter index and the property name.

如果应用网络设置步骤配置多个网络适配器,则使用变量名称中的下标 1定义第二个网络适配器的属性。If the Apply Network Settings step configures multiple network adapters, it defines the properties for the second network adapter by using the index 1 in the variable name. 例如:OSDAdapter1EnableDHCP、OSDAdapter1IPAddressList 和OSDAdapter1DNSDomain。For example: OSDAdapter1EnableDHCP, OSDAdapter1IPAddressList, and OSDAdapter1DNSDomain.

以下变量名称可用于为将由此步骤配置的第一个网络适配器定义属性:Use the following variable names to define the properties of the first network adapter for the step to configure:

OSDAdapter0EnableDHCPOSDAdapter0EnableDHCP

此设置是必需的。This setting is required. 可能的值包括 TrueFalsePossible values are True or False. 例如:For example:

true:设置为“true”将为适配器启用动态主机配置协议 (DHCP)true: enable Dynamic Host Configuration Protocol (DHCP) for the adapter

OSDAdapter0IPAddressListOSDAdapter0IPAddressList

以逗号分隔的适配器 IP 地址列表。Comma-delimited list of IP addresses for the adapter. 除非“EnableDHCP”设置为 false,否则将忽略此属性。This property is ignored unless EnableDHCP is set to false. 此设置是必需的。This setting is required.

OSDAdapter0SubnetMaskOSDAdapter0SubnetMask

以逗号分隔的子网掩码列表。Comma-delimited list of subnet masks. 除非“EnableDHCP”设置为 false,否则将忽略此属性。This property is ignored unless EnableDHCP is set to false. 此设置是必需的。This setting is required.

OSDAdapter0GatewaysOSDAdapter0Gateways

以逗号分隔的 IP 网关地址列表。Comma-delimited list of IP gateway addresses. 除非“EnableDHCP”设置为 false,否则将忽略此属性。This property is ignored unless EnableDHCP is set to false. 此设置是必需的。This setting is required.

OSDAdapter0DNSDomainOSDAdapter0DNSDomain

适配器的域名系统 (DNS) 域。Domain Name System (DNS) domain for the adapter.

OSDAdapter0DNSServerListOSDAdapter0DNSServerList

以逗号分隔的适配器 DNS 服务器列表。Comma-delimited list of DNS servers for the adapter. 此设置是必需的。This setting is required.

OSDAdapter0EnableDNSRegistrationOSDAdapter0EnableDNSRegistration

设置为 true 将在 DNS 中为适配器注册 IP 地址。Set to true to register the IP address for the adapter in DNS.

OSDAdapter0EnableFullDNSRegistrationOSDAdapter0EnableFullDNSRegistration

设置为 true 将根据计算机的完整 DNS 名称在 DNS 中为适配器注册 IP 地址。Set to true to register the IP address for the adapter in DNS under the full DNS name for the computer.

OSDAdapter0EnableIPProtocolFilteringOSDAdapter0EnableIPProtocolFiltering

设置为 true 将在适配器上启用 IP 协议筛选。Set to true to enable IP protocol filtering on the adapter.

OSDAdapter0IPProtocolFilterListOSDAdapter0IPProtocolFilterList

以逗号分隔的协议列表,这些协议被允许在 IP 的上层运行。Comma-delimited list of protocols allowed to run over IP. 如果“EnableIPProtocolFiltering”设置为 false,将忽略此属性。This property is ignored if EnableIPProtocolFiltering is set to false.

OSDAdapter0EnableTCPFilteringOSDAdapter0EnableTCPFiltering

设置为 true 将为适配器启用 TCP 端口筛选。Set to true to enable TCP port filtering for the adapter.

OSDAdapter0TCPFilterPortListOSDAdapter0TCPFilterPortList

以逗号分隔的端口列表,这些端口将被授予对 TCP 的访问权限。Comma-delimited list of ports to be granted access permissions for TCP. 如果“EnableTCPFiltering”设置为 false,将忽略此属性。This property is ignored if EnableTCPFiltering is set to false.

OSDAdapter0TcpipNetbiosOptionsOSDAdapter0TcpipNetbiosOptions

TCP/IP 上层的 NetBIOS 选项。Options for NetBIOS over TCP/IP. 可能的值如下:Possible values are as follows:

  • 0:使用 DHCP 服务器中的 NetBIOS 设置0: Use NetBIOS settings from DHCP server
  • 1:启用 TCP/IP 上层的 NetBIOS1: Enable NetBIOS over TCP/IP
  • 2:禁用 TCP/IP 上层的 NetBIOS2: Disable NetBIOS over TCP/IP

OSDAdapter0EnableWINSOSDAdapter0EnableWINS

设置为 true 以使用 WINS 进行名称解析。Set to true to use WINS for name resolution.

OSDAdapter0WINSServerListOSDAdapter0WINSServerList

以逗号分隔的 WINS 服务器 IP 地址列表。Comma-delimited list of WINS server IP addresses. 除非“EnableWINS”设置为 true,否则将忽略此属性。This property is ignored unless EnableWINS is set to true.

OSDAdapter0MacAddressOSDAdapter0MacAddress

MAC 地址,用于匹配物理网络适配器的设置。MAC address used to match settings to the physical network adapter.

OSDAdapter0NameOSDAdapter0Name

显示在网络连接控制面板程序中的网络连接的名称。The name of the network connection as it appears in the network connections control panel program. 该名称的长度介于 0 到 255 个字符之间。The name is between 0 and 255 characters long.

OSDAdapter0IndexOSDAdapter0Index

设置数组中网络适配器设置的下标。Index of the network adapter settings in the array of settings.

示例Example

  • OSDAdapterCount = 1OSDAdapterCount = 1
  • OSDAdapter0EnableDHCP = FALSEOSDAdapter0EnableDHCP = FALSE
  • OSDAdapter0IPAddressList = 192.168.0.40OSDAdapter0IPAddressList = 192.168.0.40
  • OSDAdapter0SubnetMask = 255.255.255.0OSDAdapter0SubnetMask = 255.255.255.0
  • OSDAdapter0Gateways = 192.168.0.1OSDAdapter0Gateways = 192.168.0.1
  • OSDAdapter0DNSSuffix = contoso.comOSDAdapter0DNSSuffix = contoso.com

OSDAdapterCountOSDAdapterCount

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机上安装的网络适配器的数目。Specifies the number of network adapters installed on the destination computer. 在设置 OSDAdapterCount 值时,还需为每个适配器的所有配置选项设置值。When you set the OSDAdapterCount value, also set all the configuration options for each adapter.

例如,如果为首个适配器设置 OSDAdapter0TCPIPNetbiosOptions 值,那么也必须设置该适配器的所有值。For example, if you set the OSDAdapter0TCPIPNetbiosOptions value for the first adapter, then you must configure all the values for that adapter.

如果未指定此值,任务序列将忽略所有 OSDAdapter 值。If you don't specify this value, the task sequence ignores all OSDAdapter values.

OSDApplyDriverBootCriticalContentUniqueIDOSDApplyDriverBootCriticalContentUniqueID

适用于应用驱动程序包步骤。Applies to the Apply Driver Package step.

(input)(input)

指定要从驱动程序包中进行安装的大容量存储驱动程序的内容 ID。Specifies the content ID of the mass storage device driver to install from the driver package. 如果没有指定此变量,则不安装大容量存储驱动程序。If this variable isn't specified, no mass storage driver is installed.

OSDApplyDriverBootCriticalHardwareComponentOSDApplyDriverBootCriticalHardwareComponent

适用于应用驱动程序包步骤。Applies to the Apply Driver Package step.

(input)(input)

指定无论是否安装大容量存储设备驱动程序,此变量都必须为 scsi。Specifies whether a mass storage device driver is installed, this variable must be scsi.

如果设置了 OSDApplyDriverBootCriticalContentUniqueID,则需要此变量。If OSDApplyDriverBootCriticalContentUniqueID is set, this variable is required.

OSDApplyDriverBootCriticalIDOSDApplyDriverBootCriticalID

适用于应用驱动程序包步骤。Applies to the Apply Driver Package step.

(input)(input)

指定要安装的大容量存储设备驱动程序的启动关键 ID。Specifies the boot critical ID of the mass storage device driver to install. 此 ID 列在设备驱动程序 txtsetup.oem 文件的 scsi 部分中。This ID is listed in the scsi section of the device driver's txtsetup.oem file.

如果设置了 OSDApplyDriverBootCriticalContentUniqueID,则需要此变量。If OSDApplyDriverBootCriticalContentUniqueID is set, this variable is required.

OSDApplyDriverBootCriticalINFFileOSDApplyDriverBootCriticalINFFile

适用于应用驱动程序包步骤。Applies to the Apply Driver Package step.

(input)(input)

指定要安装的大容量存储驱动程序的 INF 文件。Specifies the INF file of the mass storage driver to install.

如果设置了 OSDApplyDriverBootCriticalContentUniqueID,则需要此变量。If OSDApplyDriverBootCriticalContentUniqueID is set, this variable is required.

OSDAutoApplyDriverBestMatchOSDAutoApplyDriverBestMatch

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

(input)(input)

如果驱动程序目录中有多个设备驱动程序与硬件设备兼容,此变量确定步骤的操作。If there are multiple device drivers in the driver catalog that are compatible with a hardware device, this variable determines the step's action.

有效值Valid values

  • true(默认值):仅安装最适合的设备驱动程序true (default): Only install the best device driver

  • false:安装所有兼容的设备驱动程序并且 Windows 会选择使用最适合的驱动程序false: Installs all compatible device drivers, and Windows chooses the best driver to use

OSDAutoApplyDriverCategoryListOSDAutoApplyDriverCategoryList

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

(input)(input)

驱动程序目录类别唯一 ID 的以逗号分隔的列表。A comma-delimited list of the driver catalog category unique IDs. “自动应用驱动程序”步骤只考虑至少一个指定类别中的驱动程序。The Auto Apply Driver step only considers the drivers in at least one of the specified categories. 此值是可选的,默认情况下不设置。This value is optional, and it's not set by default. 可以通过枚举站点上的 SMS_CategoryInstance 对象列表来获取可用的类别 ID。Obtain the available category IDs by enumerating the list of SMS_CategoryInstance objects on the site.

OSDBitLockerPINOSDBitLockerPIN

适用于启用 BitLocker 步骤。Applies to the Enable BitLocker step.

为 BitLocker 加密指定 PIN。Specify the PIN for BitLocker encryption. 此变量仅在 BitLocker 模式为“TPM 和 PIN”时有效。This variable is only valid if the BitLocker mode is TPM and PIN.

OSDBitLockerRebootCountOSDBitLockerRebootCount

适用于禁用 BitLocker 步骤。Applies to the Disable BitLocker step.

从版本 1906 开始,使用此变量设置恢复保护之前的重启次数。Starting in version 1906, use this variable to set the number of restarts after which to resume protection.

有效值Valid values

一个介于 115 之间的整数。An integer from 1 to 15.

OSDBitLockerRebootCountOverrideOSDBitLockerRebootCountOverride

适用于禁用 BitLocker 步骤。Applies to the Disable BitLocker step.

从版本 1906 开始,设置此值来替代该步骤或 OSDBitLockerRebootCount 变量设置的计数。Starting in version 1906, set this value to override the count set by the step or the OSDBitLockerRebootCount variable. 虽然其他方法只接受值 1 到 15,但如果将此变量设置为 0,则 BitLocker 会永远保持禁用状态。While the other methods only accept values 1 to 15, if you set this variable to 0, BitLocker remains disabled indefinitely. 虽然在任务序列设置一个值的情况下,此变量很有用,但建议在每个设备或每个集合上设置一个单独的值。This variable is useful when the task sequence sets one value, but you want to set a separate value on a per-device or per-collection basis.

有效值Valid values

一个介于 015 之间的整数。An integer from 0 to 15.

OSDBitLockerRecoveryPasswordOSDBitLockerRecoveryPassword

适用于启用 BitLocker 步骤。Applies to the Enable BitLocker step.

(input)(input)

“启用 BitLocker”步骤使用指定的值作为恢复密码,而不是生成随机恢复密码。Instead of generating a random recovery password, the Enable BitLocker step uses the specified value as the recovery password. 此值必须是有效的数字 BitLocker 恢复密码。The value must be a valid numerical BitLocker recovery password.

OSDBitLockerStartupKeyOSDBitLockerStartupKey

适用于启用 BitLocker 步骤。Applies to the Enable BitLocker step.

(input)(input)

“启用 BitLocker”步骤使用受信任的平台模块 (TPM) 作为启动密钥,而不是为密钥管理选项“仅 USB 上的启动密钥”生成随机启动密钥。Instead of generating a random startup key for the key management option Startup Key on USB only, the Enable BitLocker step uses the Trusted Platform Module (TPM) as the startup key. 此值必须是一个有效的 256 位 Base-64 编码的 BitLocker 启动密钥。The value must be a valid, 256-bit Base64-encoded BitLocker startup key.

OSDCaptureAccountOSDCaptureAccount

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

指定在网络共享 (OSDCaptureDestination) 上有权限存储所捕获映像的 Windows 帐户名称。Specifies a Windows account name that has permissions to store the captured image on a network share (OSDCaptureDestination). 此外指定 OSDCaptureAccountPasswordAlso specify the OSDCaptureAccountPassword.

有关此捕获 OS 映像帐户的详细信息,请参阅帐户For more information on the capture OS image account, see Accounts.

OSDCaptureAccountPasswordOSDCaptureAccountPassword

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

指定用于将捕获映像存储到网络共享 (OSDCaptureDestination) 的 Windows 帐户 (OSDCaptureAccount) 的密码。Specifies the password for the Windows account (OSDCaptureAccount) used to store the captured image on a network share (OSDCaptureDestination).

OSDCaptureDestinationOSDCaptureDestination

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

指定任务序列在其中保存捕获的 OS 映像的位置。Specifies the location where the task sequence saves the captured OS image. 目录名称的最大长度为 255 个字符。The maximum directory name length is 255 characters. 如果网络共享要求进行身份验证,请指定 OSDCaptureAccountOSDCaptureAccountPassword 变量。If the network share requires authentication, specify the OSDCaptureAccount and OSDCaptureAccountPassword variables.

OSDComputerName (input)OSDComputerName (input)

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定目标计算机的名称。Specifies the name of the destination computer.

示例Example

%_SMSTSMachineName%(默认值)%_SMSTSMachineName% (default)

OSDComputerName (output)OSDComputerName (output)

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

设置为计算机的 NetBIOS 名称。Set to the NetBIOS name of the computer. 仅当 OSDMigrateComputerName 变量设置为 true 时设置该值。The value is set only if the OSDMigrateComputerName variable is set to true.

OSDConfigFileNameOSDConfigFileName

适用于应用 OS 映像步骤。Applies to the Apply OS Image step.

(input)(input)

指定与操作系统部署映像包关联的操作系统部署答案文件的文件名。Specifies the file name of the OS deployment answer file associated with the OS deployment image package.

OSDDataImageIndexOSDDataImageIndex

适用于应用数据映像步骤。Applies to the Apply Data Image step.

(input)(input)

指定应用于目标计算机的映像的索引值。Specifies the index value of the image that's applied to the destination computer.

OSDDiskIndexOSDDiskIndex

适用于格式化磁盘并分区步骤。Applies to the Format and Partition Disk step.

(input)(input)

指定要分区的物理磁盘编号。Specifies the physical disk number to be partitioned.

OSDDNSDomainOSDDNSDomain

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机使用的主 DNS 服务器。Specifies the primary DNS server that the destination computer uses.

OSDDNSSuffixSearchOrderOSDDNSSuffixSearchOrder

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机的 DNS 搜索顺序。Specifies the DNS search order for the destination computer.

OSDDomainNameOSDDomainName

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机加入的 Active Directory 域的名称。Specifies the name of the Active Directory domain that the destination computer joins. 指定的值必须是有效的 Active Directory 域服务的域名。The specified value must be a valid Active Directory Domain Services domain name.

OSDDomainOUNameOSDDomainOUName

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机加入的组织单位 (OU) 的 RFC 1779 格式名称。Specifies the RFC 1779 format name of the organizational unit (OU) that the destination computer joins. 如果指定了值,该值必须包含完整路径。If specified, the value must contain the full path.

示例Example

LDAP://OU=MyOu,DC=MyDom,DC=MyCompany,DC=com

OSDDoNotLogCommandOSDDoNotLogCommand

适用于安装包步骤。Applies to the Install Package step.

从版本 1902 开始Starting in version 1902
适用于运行命令行步骤。Applies to the Run Command Line step.

(input)(input)

若要禁止显示或记录潜在的敏感数据,请将此变量设置为 TRUETo prevent potentially sensitive data from being displayed or logged, set this variable to TRUE. 在“安装包”步骤过程中,此变量将程序名称隐藏在 smsts.log 中 。This variable masks the program name in the smsts.log during an Install Package step.

从版本 1902 开始,在将此变量设置为 TRUE 时,还可在日志文件中隐藏“运行命令行”步骤中的命令行。Starting in version 1902, when you set this variable to TRUE, it also hides the command line from the Run Command Line step in the log file.

OSDEnableTCPIPFilteringOSDEnableTCPIPFiltering

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定是否启用 TCP/IP 筛选。Specifies whether TCP/IP filtering is enabled.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDGPTBootDiskOSDGPTBootDisk

适用于格式化磁盘并分区步骤。Applies to the Format and Partition Disk step.

(input)(input)

指定是否在 GPT 硬盘上创建 EFI 分区。Specifies whether to create an EFI partition on a GPT hard disk. 基于 EFI 的计算机使用此分区作为启动磁盘。EFI-based computers use this partition as the startup disk.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDImageCreatorOSDImageCreator

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

创建映像的用户的名称(可选)。An optional name of the user who created the image. 此名称存储在 WIM 文件中。This name is stored in the WIM file. 此用户名称的最大长度为 255 个字符。The maximum length of the user name is 255 characters.

OSDImageDescriptionOSDImageDescription

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

用户定义的、捕获的 OS 映像的可选描述。An optional user-defined description of the captured OS image. 此描述存储在 WIM 文件中。This description is stored in the WIM file. 此描述的最大长度为 255 个字符。The maximum length of the description is 255 characters.

OSDImageIndexOSDImageIndex

适用于应用 OS 映像步骤。Applies to the Apply OS Image step.

(input)(input)

指定应用于目标计算机上的 WIM 文件的映像索引值。Specifies the image index value of the WIM file that's applied to the destination computer.

OSDImageVersionOSDImageVersion

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

(input)(input)

向捕获的 OS 映像分配的用户定义的版本号(可选)。An optional user-defined version number to assign to the captured OS image. 该版本号存储在 WIM 文件中。This version number is stored in the WIM file. 此值可以为字母数字字符的任意组合(最大长度为 32 个字符)。This value can be any combination of alphanumeric characters with a maximum length of 32.

OSDInstallDriversAdditionalOptionsOSDInstallDriversAdditionalOptions

适用于应用驱动程序包步骤。Applies to the Apply Driver Package step.

(input)(input)

指定在应用驱动程序包时添加到 DISM 命令行的其他选项。Specifies additional options to add to the DISM command line when applying a driver package. 任务序列不验证命令行选项。The task sequence doesn't verify the command-line options.

要使用此变量,在“应用驱动程序包”步骤上,启用设置“使用递归选项通过运行 DISM 来安装驱动程序包”。To use this variable, enable the setting, Install driver package via running DISM with recurse option , on the Apply Driver Package step.

有关详细信息,请参阅 Windows 10 DISM 命令行选项For more information, see Windows 10 DISM Command-Line Options.

OSDJoinAccountOSDJoinAccount

适用于以下步骤:Applies to the following steps:

(input)(input)

指定用于将目标计算机添加到域的域用户帐户。Specifies the domain user account that's used to add the destination computer to the domain. 此变量是加入域时必需的变量。This variable is required when joining a domain.

有关任务序列域加入帐户的详细信息,请参阅帐户For more information on the task sequence domain joining account, see Accounts.

OSDJoinDomainNameOSDJoinDomainName

适用于加入域或工作组步骤。Applies to the Join Domain or Workgroup step.

(input)(input)

指定目标计算机加入的 Active Directory 域的名称。Specifies the name of an Active Directory domain the destination computer joins. 域名长度必须介于 1 到 255 个字符之间。The length of the domain name must be between 1 and 255 characters.

OSDJoinDomainOUNameOSDJoinDomainOUName

适用于加入域或工作组步骤。Applies to the Join Domain or Workgroup step.

(input)(input)

指定目标计算机加入的组织单位 (OU) 的 RFC 1779 格式名称。Specifies the RFC 1779 format name of the organizational unit (OU) that the destination computer joins. 如果指定了值,该值必须包含完整路径。If specified, the value must contain the full path. OU 名称的长度必须介于 0 到 32,767 个字符之间。The length of the OU name must be between 0 and 32,767 characters. 如果 OSDJoinType 变量设置为 1(加入工作组),则不设置此值。This value isn't set if the OSDJoinType variable is set to 1 (join workgroup).

示例Example

LDAP://OU=MyOu,DC=MyDom,DC=MyCompany,DC=com

OSDJoinPasswordOSDJoinPassword

适用于以下步骤:Applies to the following steps:

(input)(input)

指定目标计算机加入 Active Directory 域时使用的 OSDJoinAccount 密码。Specifies the password for the OSDJoinAccount that the destination computer uses to join the Active Directory domain. 如果任务序列环境不包括此变量,Windows 安装程序会尝试使用空密码。If the task sequence environment doesn't include this variable, then Windows Setup tries a blank password. 如果变量 OSDJoinType 设置为 0(加入域),则此值为必需。If the variable OSDJoinType variable is set to 0 (join domain), this value is required.

OSDJoinSkipRebootOSDJoinSkipReboot

适用于加入域或工作组步骤。Applies to the Join Domain or Workgroup step.

(input)(input)

指定在目标计算机加入域或工作组后是否跳过重新启动。Specifies whether to skip restarting after the destination computer joins the domain or workgroup.

有效值Valid values

  • true
  • false

OSDJoinTypeOSDJoinType

适用于加入域或工作组步骤。Applies to the Join Domain or Workgroup step.

(input)(input)

指定目标计算机是否加入 Windows 域或工作组。Specifies whether the destination computer joins a Windows domain or a workgroup.

有效值Valid values

  • 0:将目标计算机加入到 Windows 域中0: Join the destination computer to a Windows domain
  • 1:将目标计算机加入到工作组中1: Join the destination computer to a workgroup

OSDJoinWorkgroupNameOSDJoinWorkgroupName

适用于加入域或工作组步骤。Applies to the Join Domain or Workgroup step.

(input)(input)

指定目标计算机加入的工作组的名称。Specifies the name of a workgroup that the destination computer joins. 工作组的名称长度必须介于 1 到 32 个字符之间。The length of the workgroup name must be between 1 and 32 characters.

OSDKeepActivationOSDKeepActivation

适用于准备 Windows 以便捕获步骤。Applies to the Prepare Windows for Capture step.

(input)(input)

指定 sysprep 是保留还是重置产品激活标志。Specifies whether sysprep keeps or resets the product activation flag.

有效值Valid values

  • true:保留激活标志true: keep the activation flag
  • false(默认值):重置激活标志false (default): reset the activation flag

OSDLocalAdminPasswordOSDLocalAdminPassword

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定本地管理员帐户密码。Specifies the local Administrator account password. 如果启用选项“随机生成本地管理员密码并在所有支持的平台上禁用帐户”,则该步骤将忽略此变量。If you enable the option to Randomly generate the local administrator password and disable the account on all supported platforms , then the step ignores this variable. 指定的值字符数必须介于 1 和 255 之间。The specified value must be between 1 and 255 characters.

OSDLogPowerShellParametersOSDLogPowerShellParameters

从版本 1902 开始Starting in version 1902
适用于运行 PowerShell 脚本步骤。Applies to the Run PowerShell Script step.

(input)(input)

为禁止记录潜在的敏感数据,“运行 PowerShell 脚本”步骤不会将脚本参数记录在 smsts.log 文件中 。To prevent potentially sensitive data from being logged, the Run PowerShell Script step doesn't log script parameters in the smsts.log file. 若要将脚本参数包含在任务序列日志中,请将此变量设置为 TRUE。To include the script parameters in the task sequence log, set this variable to TRUE.

OSDMigrateAdapterSettingsOSDMigrateAdapterSettings

适用于捕获网络设置步骤。Applies to the Capture Network Settings step.

(input)(input)

指定任务序列是否捕获网络适配器信息。Specifies whether the task sequence captures the network adapter information. 此信息包括 TCP/IP、DNS 和 WINS 的配置设置。This information includes configuration settings for TCP/IP, DNS, and WINS.

有效值Valid values

  • true(默认值)true (default)
  • false

OSDMigrateAdditionalCaptureOptionsOSDMigrateAdditionalCaptureOptions

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

指定任务序列用于捕获用户状态的其他用户状态迁移工具 (USMT) 命令行选项。Specify additional command-line options for the user state migration tool (USMT) that the task sequence uses to capture user state. 此步骤在任务序列编辑器中不公开这些设置。The step doesn't expose these settings in the task sequence editor. 将这些选项指定为一个字符串,任务序列将该字符串追加到为 ScanState 自动生成的 USMT 命令行。Specify these options as a string, which the task sequence appends to the automatically generated USMT command line for ScanState.

在运行任务序列之前,使用此任务序列变量指定的 USMT 选项未通过精确度验证。The USMT options specified with this task sequence variable aren't validated for accuracy prior to running the task sequence.

有关可用选项的详细信息,请参阅 ScanState 语法For more information on available options, see ScanState Syntax.

OSDMigrateAdditionalRestoreOptionsOSDMigrateAdditionalRestoreOptions

适用于还原用户状态步骤。Applies to the Restore User State step.

(input)(input)

指定任务序列在还原用户状态时使用的其他用户状态迁移工具 (USMT) 命令行选项。Specifies additional command-line options for the user state migration tool (USMT) that the task sequence uses when restoring the user state. 将其他选项指定为一个字符串,任务序列将该字符串追加到为 LoadState 自动生成的 USMT 命令行。Specify the additional options as a string, which the task sequence appends to the automatically generated USMT command line for LoadState.

在运行任务序列之前,使用此任务序列变量指定的 USMT 选项未通过精确度验证。The USMT options specified with this task sequence variable aren't validated for accuracy prior to running the task sequence.

有关可用选项的详细信息,请参阅 LoadState 语法For more information on available options, see LoadState Syntax.

OSDMigrateComputerNameOSDMigrateComputerName

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

(input)(input)

指定是否迁移计算机名称。Specifies whether the computer name is migrated.

有效值Valid values

OSDMigrateConfigFilesOSDMigrateConfigFiles

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

指定用于控制对用户配置文件的捕获的配置文件。Specifies the configuration files used to control the capture of user profiles. 仅当 OSDMigrateMode 设置为 Advanced 时,才使用此变量。This variable is used only if OSDMigrateMode is set to Advanced. 设置此逗号分隔的列表值,以执行自定义的用户配置文件迁移。This comma-delimited list value is set to perform customized user profile migration.

示例Example

miguser.xml,migsys.xml,migapps.xml

OSDMigrateContinueOnLockedFilesOSDMigrateContinueOnLockedFiles

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

如果 USMT 无法捕获某些文件,此变量允许继续进行用户状态捕获。If USMT can't capture some files, this variable allows the user state capture to proceed.

有效值Valid values

  • true(默认值)true (default)
  • false

OSDMigrateContinueOnRestoreOSDMigrateContinueOnRestore

适用于还原用户状态步骤。Applies to the Restore User State step.

(input)(input)

继续执行过程,即使 USMT 无法还原某些文件。Continue the process, even if USMT can't restore some files.

有效值Valid values

  • true(默认值)true (default)
  • false

OSDMigrateEnableVerboseLoggingOSDMigrateEnableVerboseLogging

适用于以下步骤:Applies to the following steps:

(input)(input)

启用 USMT 的详细日志记录。Enables verbose logging for USMT. 该步骤需要此值。The step requires this value.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDMigrateLocalAccountsOSDMigrateLocalAccounts

适用于还原用户状态步骤。Applies to the Restore User State step.

(input)(input)

指定是否还原本地计算机帐户。Specifies whether the local computer account is restored.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDMigrateLocalAccountPasswordOSDMigrateLocalAccountPassword

适用于还原用户状态步骤。Applies to the Restore User State step.

(input)(input)

如果 OSDMigrateLocalAccounts 变量为 true,此变量必须包含分配给所有已迁移的本地帐户的密码。If the OSDMigrateLocalAccounts variable is true, this variable must contain the password assigned to all migrated local accounts. USMT 将相同的密码分配给所有已迁移的本地帐户。USMT assigns the same password to all migrated local accounts. 将此密码视为临时密码,稍后使用其他方法进行更改。Consider this password as temporary, and change it later by some other method.

OSDMigrateModeOSDMigrateMode

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

允许自定义 USMT 捕获的文件。Allows you to customize the files that USMT captures.

有效值Valid values

  • Simple:任务序列只会使用标准 USMT 配置文件Simple: The task sequence only uses the standard USMT configuration files

  • Advanced:任务序列变量 OSDMigrateConfigFiles 会指定 USMT 使用的配置文件Advanced: The task sequence variable OSDMigrateConfigFiles specifies the configuration files that USMT uses

OSDMigrateNetworkMembershipOSDMigrateNetworkMembership

适用于捕获网络设置步骤。Applies to the Capture Network Settings step.

(input)(input)

指定任务序列是否迁移工作组或域成员身份信息。Specifies whether the task sequence migrates the workgroup or domain membership information.

有效值Valid values

  • true(默认值)true (default)
  • false

OSDMigrateRegistrationInfoOSDMigrateRegistrationInfo

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

(input)(input)

指定该步骤是否迁移用户和组织信息。Specifies whether the step migrates user and organization information.

有效值Valid values

OSDMigrateSkipEncryptedFilesOSDMigrateSkipEncryptedFiles

适用于捕获用户状态步骤。Applies to the Capture User State step.

(input)(input)

指定是否捕获加密文件。Specifies whether encrypted files are captured.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDMigrateTimeZoneOSDMigrateTimeZone

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

(input)(input)

指定是否迁移计算机名称时区。Specifies whether the computer time zone is migrated.

有效值Valid values

OSDNetworkJoinTypeOSDNetworkJoinType

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机是否加入 Active Directory 域或工作组。Specifies whether the destination computer joins an Active Directory domain or a workgroup.

“值”的值Value values

  • 0:加入 Active Directory 域0: Join an Active Directory domain
  • 1:加入工作组1: Join a workgroup

OSDPartitionsOSDPartitions

适用于格式化磁盘并分区步骤。Applies to the Format and Partition Disk step.

(input)(input)

此任务序列变量是分区设置的一个数组变量。This task sequence variable is an array variable of partition settings. 数组中的每个元素都代表硬盘上单个分区的设置。Each element in the array represents the settings for a single partition on the hard disk. 通过将数组变量名称与基于零的磁盘分区号及属性名称组合,可以访问为每个分区定义的设置。Access the settings defined for each partition by combining the array variable name with the zero-based disk partition number and the property name.

以下变量名称可用于为此步骤在硬盘上创建的第一个分区定义属性:Use the following variable names to define the properties for the first partition that this step creates on the hard disk:

OSDPartitions0TypeOSDPartitions0Type

指定分区类型。Specifies the type of partition. 此属性为必需。This property is required. 有效值为 PrimaryExtendedLogicalHiddenValid values are Primary, Extended, Logical, and Hidden.

OSDPartitions0FileSystemOSDPartitions0FileSystem

指定格式化分区时使用的文件系统类型。Specifies the type of file system to use when formatting the partition. 此属性为可选。This property is optional. 如果不指定文件系统,此步骤不会格式化分区。If you don't specify a file system, the step doesn't format the partition. 有效值为 FAT32NTFSValid values are FAT32 and NTFS.

OSDPartitions0BootableOSDPartitions0Bootable

指定分区是否可引导。Specifies whether the partition is bootable. 此属性为必需。This property is required. 如果 MBR 磁盘的该值设置为 TRUE,则此步骤将该分区标记为活动分区。If this value is set to TRUE for MBR disks, then the step marks this partition as active.

OSDPartitions0QuickFormatOSDPartitions0QuickFormat

指定使用的格式类型。Specifies the type of format that is used. 此属性为必需。This property is required. 如果此值设置为 TRUE,此步骤执行快速格式化。If this value is set to TRUE, the step performs a quick format. 否则,该步骤执行完全格式化。Otherwise, the step performs a full format.

OSDPartitions0VolumeNameOSDPartitions0VolumeName

指定格式化时分配给该卷的名称。Specifies the name that's assigned to the volume when it's formatted. 此属性为可选。This property is optional.

OSDPartitions0SizeOSDPartitions0Size

指定分区的大小。Specifies the size of the partition. 此属性为可选。This property is optional. 如果未指定此属性,将使用所有剩余可用空间来创建分区。If this property isn't specified, the partition is created using all remaining free space. 单位由 OSDPartitions0SizeUnits 变量指定。Units are specified by the OSDPartitions0SizeUnits variable.

OSDPartitions0SizeUnitsOSDPartitions0SizeUnits

该步骤使用这些单位来解释 OSDPartitions0Size 变量。The step uses these units to interpret the OSDPartitions0Size variable. 此属性为可选。This property is optional. 有效值为 MB(默认值)、GBPercentValid values are MB (default), GB, and Percent.

OSDPartitions0VolumeLetterVariableOSDPartitions0VolumeLetterVariable

此步骤创建分区后,分区始终使用 Windows PE 中的下一可用驱动器号。When this step creates partitions, it always uses the next available drive letter in Windows PE. 使用此可选属性指定另一个任务序列变量的名称。Use this optional property to specify the name of another task sequence variable. 该步骤使用此变量保存新的驱动器号,供将来参考。The step uses this variable to save the new drive letter for future reference.

如果使用此任务序列步骤定义多个分区,可使用变量名称中的下标 1 来定义第二个分区的属性。If you define multiple partitions with this task sequence step, the properties for the second partition are defined by using the 1 index in the variable name. 例如:OSDPartitions1Type、OSDPartitions1FileSystem、OSDPartitions1Bootable、OSDPartitions1QuickFormat 和 OSDPartitions1VolumeName 。For example: OSDPartitions1Type , OSDPartitions1FileSystem , OSDPartitions1Bootable , OSDPartitions1QuickFormat , and OSDPartitions1VolumeName.

OSDPartitionStyleOSDPartitionStyle

适用于格式化磁盘并分区步骤。Applies to the Format and Partition Disk step.

(input)(input)

指定对磁盘进行分区时使用的分区类型。Specifies the partition style to use when partitioning the disk.

有效值Valid values

  • GPT:使用 GUID 分区表形式GPT: Use the GUID Partition Table style
  • MBR:使用主启动记录分区形式MBR: Use the master boot record partition style

OSDProductKeyOSDProductKey

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定 Windows 产品密钥。Specifies the Windows product key. 指定的值字符数必须介于 1 和 255 之间。The specified value must be between 1 and 255 characters.

OSDRandomAdminPasswordOSDRandomAdminPassword

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定在新操作系统中为本地管理员帐户随机生成的密码。Specifies a randomly generated password for the local Administrator account in the new OS.

有效值Valid values

  • true(默认值):Windows 安装程序禁用目标计算机上的本地管理员帐户true (default): Windows Setup disables the local Administrator account on the target computer

  • false:Windows 安装程序将在目标计算机上启用本地管理员帐户,并将帐户密码设置为 OSDLocalAdminPassword 的值false: Windows Setup enables the local administrator account on the target computer, and sets the account password to the value of OSDLocalAdminPassword

OSDRegisteredOrgName (input)OSDRegisteredOrgName (input)

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定新操作系统中的默认注册组织名称。Specifies the default registered organization name in the new OS. 指定的值字符数必须介于 1 和 255 之间。The specified value must be between 1 and 255 characters.

OSDRegisteredOrgName (output)OSDRegisteredOrgName (output)

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

设置为计算机的注册组织名称。Set to the registered organization name of the computer. 仅当 OSDMigrateRegistrationInfo 变量被设置为 true 时,才设置该值。The value is set only if the OSDMigrateRegistrationInfo variable is set to true.

OSDRegisteredUserNameOSDRegisteredUserName

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定新操作系统中的默认注册用户名。Specifies the default registered user name in the new OS. 指定的值字符数必须介于 1 和 255 之间。The specified value must be between 1 and 255 characters.

OSDServerLicenseConnectionLimitOSDServerLicenseConnectionLimit

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定允许的最大连接数。Specifies the maximum number of connections allowed. 指定的连接数必须介于 5 和 9999 之间。The specified number must be in the range between 5 and 9999 connections.

OSDServerLicenseModeOSDServerLicenseMode

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

(input)(input)

指定使用的 Windows Server 许可证模式。Specifies the Windows Server license mode that's used.

有效值Valid values

  • PerSeat
  • PerServer

OSDSetupAdditionalUpgradeOptionsOSDSetupAdditionalUpgradeOptions

适用于升级操作系统步骤。Applies to the Upgrade Operating System step.

(input)(input)

指定在 Windows 10 升级过程中添加到 Windows 安装程序的其他命令行选项。Specifies the additional command-line options that are added to Windows Setup during a Windows 10 upgrade. 任务序列不验证命令行选项。The task sequence doesn't verify the command-line options.

有关详细信息,请参阅 Windows 安装程序命令行选项For more information, see Windows Setup Command-Line Options.

OSDStateFallbackToNAAOSDStateFallbackToNAA

适用于请求状态存储步骤。Applies to the Request State Store step.

(input)(input)

当计算机帐户无法连接到状态迁移点时,此变量指定任务序列步骤是否应回退到使用网络访问帐户 (NAA)。When the computer account fails to connect to the state migration point, this variable specifies whether the task sequence falls back to use the network access account (NAA).

有关网络访问帐户的详细信息,请参阅帐户For more information on the network access account, see Accounts.

有效值Valid values

  • true
  • false(默认值)false (default)

OSDStateSMPRetryCountOSDStateSMPRetryCount

适用于请求状态存储步骤。Applies to the Request State Store step.

(input)(input)

指定在步骤失败前,任务列表步骤尝试查找状态迁移点的次数。Specifies the number of times that the task sequence step tries to find a state migration point before the step fails. 指定的计数必须介于 0 和 600 之间。The specified count must be between 0 and 600.

OSDStateSMPRetryTimeOSDStateSMPRetryTime

适用于请求状态存储步骤。Applies to the Request State Store step.

(input)(input)

指定任务序列步骤在重新尝试之间等待的秒数。Specifies the number of seconds that the task sequence step waits between retry attempts. 秒数最多可为 30 个字符。The number of seconds can be a maximum of 30 characters.

OSDStateStorePathOSDStateStorePath

适用于以下步骤:Applies to the following steps:

(input)(input)

任务序列保存或还原用户状态的文件夹的网络共享或本地路径名称。The network share or local path name of the folder where the task sequence saves or restores the user state. 无默认值。There is no default value.

OSDTargetSystemDriveOSDTargetSystemDrive

适用于应用 OS 映像步骤。Applies to the Apply OS Image step.

(output)(output)

指定在应用映像后包含操作系统文件的分区的驱动器号。Specifies the drive letter of the partition that contains the OS files after the image is applied.

OSDTargetSystemRoot (input)OSDTargetSystemRoot (input)

适用于捕获 OS 映像步骤。Applies to the Capture OS Image step.

指定引用计算机上已安装操作系统的 Windows 目录的路径。Specifies the path to the Windows directory of the installed OS on the reference computer. 任务序列将验证它是由 Configuration Manager 捕获的受支持的操作系统。The task sequence verifies it as a supported OS for capture by Configuration Manager.

OSDTargetSystemRoot (output)OSDTargetSystemRoot (output)

适用于准备 Windows 以便捕获步骤。Applies to the Prepare Windows for Capture step.

指定引用计算机上已安装操作系统的 Windows 目录的路径。Specifies the path to the Windows directory of the installed OS on the reference computer. 任务序列将验证它是由 Configuration Manager 捕获的受支持的操作系统。The task sequence verifies it as a supported OS for capture by Configuration Manager.

OSDTimeZone (input)OSDTimeZone (input)

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的默认时区设置。Specifies the default time zone setting that's used in the new OS.

将此变量的值设置为时区的非特定语言名称。Set the value of this variable to the language invariant name of time zone. 例如,在以下注册表项下时区的 Std 值中使用字符串:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time ZonesFor example, use the string in the Std value for a time zone under the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones.

OSDTimeZone (output)OSDTimeZone (output)

适用于捕获 Windows 设置步骤。Applies to the Capture Windows Settings step.

设置为计算机的时区。Set to the time zone of the computer. 仅当 OSDMigrateTimeZone 变量设置为 true 时,才设置该值。The value is set only if the OSDMigrateTimeZone variable is set to true.

OSDWindowsSettingsInputLocaleOSDWindowsSettingsInputLocale

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的默认输入法区域设置。Specifies the default input locale setting that's used in the new OS.

有关此 Windows 安装程序答案文件值的详细信息,请参阅 Microsoft-Windows-International-Core - InputLocaleFor more information on the Windows setup answer file value, see Microsoft-Windows-International-Core - InputLocale.

OSDWindowsSettingsSystemLocaleOSDWindowsSettingsSystemLocale

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的默认系统区域设置。Specifies the default system locale setting that's used in the new OS.

有关此 Windows 安装程序答案文件值的详细信息,请参阅 Microsoft-Windows-International-Core - SystemLocaleFor more information on the Windows setup answer file value, see Microsoft-Windows-International-Core - SystemLocale.

OSDWindowsSettingsUILanguageOSDWindowsSettingsUILanguage

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的默认用户界面语言设置。Specifies the default user interface language setting that's used in the new OS.

有关此 Windows 安装程序答案文件值的详细信息,请参阅 Microsoft-Windows-International-Core - UILanguageFor more information on the Windows setup answer file value, see Microsoft-Windows-International-Core - UILanguage.

OSDWindowsSettingsUILanguageFallbackOSDWindowsSettingsUILanguageFallback

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的备用用户界面语言设置。Specifies the fallback user interface language setting that's used in the new OS.

有关此 Windows 安装程序答案文件值的详细信息,请参阅 Microsoft-Windows-International-Core - UILanguageFallbackFor more information on the Windows setup answer file value, see Microsoft-Windows-International-Core - UILanguageFallback.

OSDWindowsSettingsUserLocaleOSDWindowsSettingsUserLocale

适用于应用 Windows 设置步骤。Applies to the Apply Windows Settings step.

指定在新操作系统中使用的默认用户区域设置。Specifies the default user locale setting that's used in the new OS.

有关此 Windows 安装程序答案文件值的详细信息,请参阅 Microsoft-Windows-International-Core - UserLocaleFor more information on the Windows setup answer file value, see Microsoft-Windows-International-Core - UserLocale.

OSDWipeDestinationPartitionOSDWipeDestinationPartition

适用于应用数据映像步骤。Applies to the Apply Data Image step.

(input)(input)

指定是否删除位于目标分区上的文件。Specifies whether to delete the files located on the destination partition.

有效值Valid values

  • true(默认值)true (default)
  • false

OSDWorkgroupNameOSDWorkgroupName

适用于应用网络设置步骤。Applies to the Apply Network Settings step.

(input)(input)

指定目标计算机加入的工作组的名称。Specifies the name of the workgroup that the destination computer joins.

指定此变量或 OSDDomainName 变量。Specify either this variable or the OSDDomainName variable. 工作组名称最多可使用 32 个字符。The workgroup name can be a maximum of 32 characters.

SetupCompletePauseSetupCompletePause

适用于升级操作系统步骤。Applies to the Upgrade Operating System step.

从版本 1910 开始,使用此变量来处理在 Windows 安装程序完成后高性能设备上 Window 10 就地升级任务序列的计时问题。Starting in version 1910, use this variable to address timing issues with the Window 10 in-place upgrade task sequence on high performance devices when Windows setup is complete. 在将以秒为单位的值分配给此变量时,Windows 安装过程会在启动任务序列之前延迟该时长。When you assign a value in seconds to this variable, the Windows setup process delays that amount of time before it starts the task sequence. 此超时向 Configuration Manager 客户端提供了额外的时间来进行初始化。This timeout provides the Configuration Manager client additional time to initialize.

以下日志条目是此问题的常见示例,你可使用此变量进行修正:The following log entries are common examples of this issue that you can remediate with this variable:

  • TSManager 组件在 smsts.log 中记录类似于以下错误的条目:The TSManager component records entries similar to the following errors in the smsts.log :

    Failed to initate policy evaluation for namespace 'root\ccm\policy\machine', hr=0x80041010
    Error compiling client config policies. code 80041010
    Task Sequence Manager could not initialize Task Sequence Environment. code 80041010
    
  • Windows 安装程序在 setupcomplete.log 中记录类似于以下错误的条目:Windows setup records entries similar to the following errors in the setupcomplete.log :

    Running C:\windows\CCM\\TSMBootstrap.exe to resume task sequence
    ERRORLEVEL = -1073741701
    TSMBootstrap did not request reboot, resetting registry
    Exiting setupcomplete.cmd
    

SMSClientInstallPropertiesSMSClientInstallProperties

适用于安装 Windows 和 ConfigMgr 步骤。Applies to the Setup Windows and ConfigMgr step.

(input)(input)

指定在安装 Configuration Manager 客户端时任务序列所使用的客户端安装属性。Specifies the client installation properties that the task sequence uses when installing the Configuration Manager client.

有关详细信息,请参阅关于客户端安装参数和属性For more information, see About client installation parameters and properties.

SMSConnectNetworkFolderAccountSMSConnectNetworkFolderAccount

适用于连接到网络文件夹步骤。Applies to the Connect To Network Folder step.

(input)(input)

指定用于连接到 SMSConnectNetworkFolderPath 中的网络共享的用户帐户。Specifies the user account that is used to connect to the network share in SMSConnectNetworkFolderPath. 使用 SMSConnectNetworkFolderPassword 值指定帐户密码。Specify the account password with the SMSConnectNetworkFolderPassword value.

有关任务序列网络文件夹连接帐户的详细信息,请参阅帐户For more information on the task sequence network folder connection account, see Accounts.

SMSConnectNetworkFolderDriveLetterSMSConnectNetworkFolderDriveLetter

适用于连接到网络文件夹步骤。Applies to the Connect To Network Folder step.

(input)(input)

指定要连接的网络驱动器号。Specifies the network drive letter to connect to. 此值是可选的。This value is optional. 如果不指定此值,则网络连接不会映射到某个驱动器号。If it's not specified, then the network connection isn't mapped to a drive letter. 如果指定此值,该值必须在 D 到 Z 范围内。不能使用 X,它是在 Windows PE 阶段由 Windows PE 使用的驱动器号。If this value is specified, the value must be in the range from D to Z. Don't use X, it's the drive letter used by Windows PE during the Windows PE phase.

示例Examples

  • D:
  • E:

SMSConnectNetworkFolderPasswordSMSConnectNetworkFolderPassword

适用于连接到网络文件夹步骤。Applies to the Connect To Network Folder step.

(input)(input)

指定用于连接到 SMSConnectNetworkFolderPath 中的网络共享的 SMSConnectNetworkFolderAccount 密码。Specifies the password for the SMSConnectNetworkFolderAccount that is used to connect to the network share in SMSConnectNetworkFolderPath.

SMSConnectNetworkFolderPathSMSConnectNetworkFolderPath

适用于连接到网络文件夹步骤。Applies to the Connect To Network Folder step.

(input)(input)

指定连接的网络路径。Specifies the network path for the connection. 如果需要将此路径映射到驱动器号,使用 SMSConnectNetworkFolderDriveLetter 值。If you need to map this path to a drive letter, use the SMSConnectNetworkFolderDriveLetter value.

示例Example

\\server\share

SMSInstallUpdateTargetSMSInstallUpdateTarget

适用于安装软件更新步骤。Applies to the Install Software Updates step.

(input)(input)

指定是否安装所有更新或仅安装必备更新。Specifies whether to install all updates or only mandatory updates.

有效值Valid values

  • All
  • Mandatory

SMSRebootMessageSMSRebootMessage

适用于重新启动计算机步骤。Applies to the Restart Computer step.

(input)(input)

指定重新启动计算机之前要向用户显示的消息。Specifies the message to be displayed to users before restarting the destination computer. 如果未设置此变量,则显示默认消息文本。If this variable isn't set, the default message text is displayed. 指定的消息不能超过 512 个字符。The specified message can't exceed 512 characters.

示例Example

Save your work before the computer restarts.

SMSRebootTimeoutSMSRebootTimeout

适用于重新启动计算机步骤。Applies to the Restart Computer step.

(input)(input)

指定计算机重新启动之前向用户显示警告的秒数。Specifies the number of seconds that the warning is displayed to the user before the computer restarts.

示例Examples

  • 0(默认值):不显示重新启动消息0 (default): Don't display a reboot message
  • 60:显示一分钟的警告60: Display the warning for one minute

SMSTSAssignmentsDownloadIntervalSMSTSAssignmentsDownloadInterval

客户端自上次尝试(未返回策略)下载策略到再次尝试之前所等待的秒数。The number of seconds to wait before the client attempts to download the policy since the last attempt that returned no policies. 默认情况下,客户端将等待 0 秒,然后再重试。By default, the client waits 0 seconds before retrying.

可以使用媒体或 PXE 中的预启动命令来设置此变量。You can set this variable by using a prestart command from media or PXE.

SMSTSAssignmentsDownloadRetrySMSTSAssignmentsDownloadRetry

客户端在初次尝试下载策略而未找到策略之后再次进行下载尝试的次数。The number of times a client attempts to download the policy after no policies are found on the first attempt. 默认情况下,客户端重新尝试 0 次。By default, the client retries 0 times.

可以使用媒体或 PXE 中的预启动命令来设置此变量。You can set this variable by using a prestart command from media or PXE.

SMSTSAssignUsersModeSMSTSAssignUsersMode

指定任务序列如何将用户与目标计算机关联。Specifies how a task sequence associates users with the destination computer. 将该变量设置为以下值之一:Set the variable to one of the following values:

  • 自动: :当任务序列将 OS 部署到目标计算机时,它会创建指定用户和目标计算机之间的关系。Auto : When the task sequence deploys the OS to the destination computer, it creates a relationship between the specified users and destination computer.

  • 挂起 :任务序列会创建指定用户和目标计算机之间的关系。Pending : The task sequence creates a relationship between the specified users and the destination computer. 管理员必须批准该关系才能对其进行设置。An administrator must approve the relationship to set it.

  • 已禁用 :当任务序列部署 OS 时,它不会将用户与目标计算机关联。Disabled : The task sequence doesn't associate users with the destination computer when it deploys the OS.

SMSTSDisableStatusRetrySMSTSDisableStatusRetry

在断开连接的应用场景中,任务序列引擎重复尝试将状态消息发送到管理点。In disconnected scenarios, the task sequence engine repeatedly tries to send status messages to the management point. 在这种情况下,此行为会导致在任务序列处理过程中的延迟。This behavior in this scenario causes delays in task sequence processing.

将此变量设置为 true 后,任务序列引擎将不会尝试在第一次消息发送失败之后重新发送状态消息。Set this variable to true and the task sequence engine doesn't attempt to send status messages after the first message fails to send. 该第一次尝试包含多次重试。This first attempt includes multiple retries.

重启任务序列时,此变量的值仍然存在。When the task sequence restarts, the value of this variable persists. 但任务序列会尝试发送初始状态消息。However, the task sequence tries sending an initial status message. 该第一次尝试包含多次重试。This first attempt includes multiple retries. 如果成功,任务序列会继续发送状态,不会考虑此变量的值。If successful, the task sequence continues sending status regardless of the value of this variable. 如果状态发送失败,任务序列将使用此变量的值。If status fails to send, the task sequence uses the value of this variable.

备注

任务序列状态报告依赖这些状态消息,以显示进度、历史记录和每个步骤的详细信息。Task sequence status reporting relies upon these status messages to display the progress, history, and details of each step. 如果状态消息无法发送,则不排入队列。If status messages fail to send, they're not queued. 将连接还原到管理点后,也不会稍后发送它们。When connectivity is restored to the management point, they're not sent at a later time. 此行为会导致任务序列状态报告为“不完整”或“缺少项目”。This behavior results in task sequence status reporting to be incomplete and missing items.

SMSTSDisableWow64RedirectionSMSTSDisableWow64Redirection

适用于运行命令行步骤。Applies to the Run Command Line step.

(input)(input)

默认在 64 位操作系统上,任务序列使用 WOW64 文件系统重定向程序在命令行查找并运行程序。By default on a 64-bit OS, the task sequence locates and runs the program in the command line using the WOW64 file system redirector. 此行为允许使用命令查找 32 位版本的操作系统程序和 DLL。This behavior allows the command to find 32-bit versions of OS programs and DLLs. 将此变量设置为 true 可禁用 WOW64 文件系统重定向程序。Setting this variable to true disables the use of the WOW64 file system redirector. 此命令查找本机 64 位版本的操作系统程序和 DLL。The command finds native 64-bit versions of OS programs and DLLs. 在 32 位操作系统上运行时,此变量没有任何作用。This variable has no effect when running on a 32-bit OS.

SMSTSDownloadAbortCodeSMSTSDownloadAbortCode

此变量包含外部程序下载程序的中止代码值。This variable contains the abort code value for the external program downloader. 此程序在 SMSTSDownloadProgram 变量中指定。This program is specified in the SMSTSDownloadProgram variable. 如果程序返回的错误代码等于 SMSTSDownloadAbortCode 变量的值,则内容下载失败,且未尝试其他下载方法。If the program returns an error code equal to the value of the SMSTSDownloadAbortCode variable, then the content download fails and no other download method is attempted.

SMSTSDownloadProgramSMSTSDownloadProgram

使用此变量来指定替换内容提供程序 (ACP)。Use this variable to specify an alternate content provider (ACP). ACP 是用于下载内容的下载程序。An ACP is a downloader program that's used to download content. 任务序列使用 ACP,而不是默认的 Configuration Manager 下载程序。The task sequence uses the ACP instead of the default Configuration Manager downloader. 作为内容下载过程的一部分,任务序列会检查此变量。As part of the content download process, the task sequence checks this variable. 如果已指定,则任务序列会运行程序来下载内容。If specified, the task sequence runs the program to download the content.

SMSTSDownloadRetryCountSMSTSDownloadRetryCount

Configuration Manager 尝试从分发点下载内容的次数。The number of times that Configuration Manager attempts to download content from a distribution point. 默认情况下,客户端重新尝试 2 次。By default, the client retries 2 times.

SMSTSDownloadRetryDelaySMSTSDownloadRetryDelay

Configuration Manager 重新尝试从分发点下载内容前等待的秒数。The number of seconds that Configuration Manager waits before it retries to download content from a distribution point. 默认情况下,客户端将等待 15 秒,然后再重试。By default, the client waits 15 seconds before retrying.

SMSTSDriverRequestConnectTimeOutSMSTSDriverRequestConnectTimeOut

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

请求驱动程序目录时,此变量用于指定任务序列等待 HTTP 服务器连接的秒数。When requesting the driver catalog, this variable is the number of seconds the task sequence waits for the HTTP server connection. 如果连接时间超过超时设定值,任务序列会取消该请求。If the connection takes longer than the timeout setting, the task sequence cancels the request. 默认情况下,超时时间设置为 60 秒。By default, the timeout is set to 60 seconds.

SMSTSDriverRequestReceiveTimeOutSMSTSDriverRequestReceiveTimeOut

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

请求驱动程序目录时,此变量用于指定任务序列等待响应的秒数。When requesting the driver catalog, this variable is the number of seconds the task sequence waits for a response. 如果连接时间超过超时设定值,任务序列会取消该请求。If the connection takes longer than the timeout setting, the task sequence cancels the request. 默认情况下,超时时间设置为 480 秒。By default, the timeout is set to 480 seconds.

SMSTSDriverRequestResolveTimeOutSMSTSDriverRequestResolveTimeOut

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

请求驱动程序目录时,此变量用于指定任务序列等待 HTTP 名称解析的秒数。When requesting the driver catalog, this variable is the number of seconds the task sequence waits for HTTP name resolution. 如果连接时间超过超时设定值,任务序列会取消该请求。If the connection takes longer than the timeout setting, the task sequence cancels the request. 默认情况下,超时时间设置为 60 秒。By default, the timeout is set to 60 seconds.

SMSTSDriverRequestSendTimeOutSMSTSDriverRequestSendTimeOut

适用于自动应用驱动程序步骤。Applies to the Auto Apply Drivers step.

请求驱动程序目录时,此变量用于指定任务序列等待发送请求的秒数。When sending a request for the driver catalog, this variable is the number of seconds the task sequence waits to send the request. 如果请求时间超过超时设定值,任务序列会取消该请求。If the request takes longer than the timeout setting, the task sequence cancels the request. 默认情况下,超时时间设置为 60 秒。By default, the timeout is set to 60 seconds.

SMSTSErrorDialogTimeoutSMSTSErrorDialogTimeout

当任务序列中发生错误时,它将显示对话框并包含相关错误。When an error occurs in a task sequence, it displays a dialog box with the error. 任务序列在此变量指定的秒数后自动将其关闭。The task sequence automatically dismisses it after the number of seconds specified by this variable. 默认情况下,该值为 900 秒(15 分钟)。By default, this value is 900 seconds (15 minutes).

SMSTSLanguageFolderSMSTSLanguageFolder

使用此变量可更改语言中性启动映像的显示语言。Use this variable to change the display language of a language neutral boot image.

SMSTSLocalDataDriveSMSTSLocalDataDrive

指定了运行任务序列时在目标计算机上保存临时缓存文件的位置。Specifies where the task sequence stores temporary cache files on the destination computer while it's running.

在任务序列开始前设置此变量,例如通过设置集合变量。Set this variable before the task sequence starts, such as by setting a collection variable. 任务序列启动后,Configuration Manager 根据定义的 SMSTSLocalDataDrive 变量来定义 _SMSTSMDataPath 变量。Once the task sequence starts, Configuration Manager defines the _SMSTSMDataPath variable based on what the SMSTSLocalDataDrive variable was defined to.

SMSTSMPSMSTSMP

使用此变量指定 Configuration Manager 管理点的 URL 或 IP 地址。Use this variable to specify the URL or IP address of the Configuration Manager management point.

SMSTSMPListRequestTimeoutEnabledSMSTSMPListRequestTimeoutEnabled

适用于以下步骤:Applies to the following steps:

(input)(input)

使用此变量启用重复的 MPList 请求,以便在客户端不在 Intranet 上时刷新客户端。If the client isn't on the intranet, use this variable to enable repeated MPList requests to refresh the client. 默认情况下,此变量设置为 TrueBy default, this variable is set to True.

当客户端位于 Internet 上时,将此变量设置为 False 以避免不必要的延迟。When clients are on the internet, set this variable to False to avoid unnecessary delays.

SMSTSMPListRequestTimeoutSMSTSMPListRequestTimeout

适用于以下步骤:Applies to the following steps:

(input)(input)

此变量指定任务序列在利用定位服务检索管理点列表 (MPList) 失败后重新尝试此步骤之前等待的毫秒数。If the task sequence fails to retrieve the management point list (MPList) from location services, this variable specifies how many milliseconds it waits before it retries the step. 默认情况下,任务序列在重新尝试之前会等待 60000 毫秒(60 秒)。By default, the task sequence waits 60000 milliseconds (60 seconds) before it retries. 最多重试三次。It retries up to three times.

SMSTSPeerDownloadSMSTSPeerDownload

使用此变量可使客户端能够使用 Windows PE 对等缓存。Use this variable to enable the client to use Windows PE peer cache. 将此变量设置为 true 可启用此功能。Setting this variable to true enables this functionality.

SMSTSPeerRequestPortSMSTSPeerRequestPort

Windows PE 对等缓存用于初始广播的自定义网络端口。A custom network port that Windows PE peer cache uses for the initial broadcast. 客户端设置中配置的默认端口为 8004。The default port configured in client settings is 8004.

SMSTSPersistContentSMSTSPersistContent

使用此变量可临时将内容保存在任务序列缓存中。Use this variable to temporarily persist content in the task sequence cache. 此变量不同于 SMSTSPreserveContent,它会在任务序列完成后将内容保存在 Configuration Manager 客户端缓存中。This variable is different from SMSTSPreserveContent, which keeps content in the Configuration Manager client cache after the task sequence is complete. SMSTSPersistContent 使用任务序列缓存,而 SMSTSPreserveContent 使用 Configuration Manager 客户端缓存。SMSTSPersistContent uses the task sequence cache, SMSTSPreserveContent uses the Configuration Manager client cache.

SMSTSPostActionSMSTSPostAction

指定任务序列完成后运行的命令。Specifies a command that's run after the task sequence completes. 在退出任务序列之前,TSManager 进程将生成指定的 post 操作。Just before exiting the task sequence, the TSManager process spawns the specified post action. 它不会等待或记录任何状态,只在调用该命令后退出。It doesn't wait or record any status, just exits after calling that command.

例如,指定 shutdown.exe /r /t 30 /f 以在任务序列完成后 30 秒重启计算机。For example, specify shutdown.exe /r /t 30 /f to restart the computer 30 seconds after the task sequence completes.

SMSTSPreferredAdvertIDSMSTSPreferredAdvertID

强制任务序列运行目标计算机上的特定目标部署。Forces the task sequence to run a specific targeted deployment on the destination computer. 可通过媒体或 PXE 的预启动命令对此变量进行设置。Set this variable through a prestart command from media or PXE. 如果设置此变量,则任务序列覆盖任何必需的部署。If this variable is set, the task sequence overrides any required deployments.

SMSTSPreserveContentSMSTSPreserveContent

此变量用于标志在部署后将保留在 Configuration Manager 客户端缓存中的任务序列内容。This variable flags the content in the task sequence to be kept in the Configuration Manager client cache after the deployment. 此变量不同于 SMSTSPersistContent,后者仅保留任务序列持续期间的内容。This variable is different from SMSTSPersistContent, which only keeps the content for the duration of the task sequence. SMSTSPersistContent 使用任务序列缓存,而 SMSTSPreserveContent 使用 Configuration Manager 客户端缓存。SMSTSPersistContent uses the task sequence cache, SMSTSPreserveContent uses the Configuration Manager client cache. 将 SMSTSPreserveContent 设置为 true 可启用此功能。Set SMSTSPreserveContent to true to enable this functionality.

SMSTSRebootDelaySMSTSRebootDelay

指定在计算机重新启动之前要等待多少秒。Specifies how many seconds to wait before the computer restarts. 如果此变量为零 0,则任务序列管理器在重启之前不会显示通知对话框。If this variable is zero (0), the task sequence manager doesn't display a notification dialog before reboot.

示例Example

  • 0:不显示通知消息0: don't display a notification

  • 60:显示通知消息 1 分钟60: display a notification for one minute

SMSTSRebootDelayNextSMSTSRebootDelayNext

从版本 1906 开始,将此新变量与现有的 SMSTSRebootDelay 变量一起使用。Starting in version 1906, use this variable with the existing SMSTSRebootDelay variable. 若要稍后执行超时值不同于第一个的任何重启,请将 SMSTSRebootDelayNext 设置为其他值(以秒为单位)。If you want any later reboots to happen with a different timeout than the first, set SMSTSRebootDelayNext to a different value in seconds.

示例Example

要在启动 Windows 10 就地升级任务序列时,向用户提供 60 分钟重启通知。You want to give users a 60-minute reboot notification at the start of a Windows 10 in-place upgrade task sequence. 经过第一次长时间的超时,你希望附加的超时仅为 60 秒。After that first long timeout, you want additional timeouts to only be 60 seconds. 将 SMSTSRebootDelay 设置为 3600,并将 SMSTSRebootDelayNext 设置为 60Set SMSTSRebootDelay to 3600, and SMSTSRebootDelayNext to 60.

SMSTSRebootMessageSMSTSRebootMessage

指定要在重启通知对话框中显示的消息。Specifies the message to display in the restart notification dialog. 如果未设置此变量,则显示默认消息。If this variable isn't set, a default message appears.

示例Example

The task sequence is restarting this computer

SMSTSRebootRequestedSMSTSRebootRequested

指示当前任务序列步骤完成后,请求重新启动。Indicates that a restart is requested after the current task sequence step is completed. 如果任务序列步骤需要重启才能完成操作,请设置此变量。If the task sequence step requires a restart to complete the action, set this variable. 重启计算机后,任务序列继续从下一个任务序列步骤运行。After the computer restarts, the task sequence continues to run from the next task sequence step.

  • HD:重启到已安装的操作系统HD: Restart to the installed OS
  • WinPE:重启到关联的启动映像WinPE: Restart to the associated boot image

SMSTSRetryRequestedSMSTSRetryRequested

在完成当前的任务序列步骤后,将请求重试。Requests a retry after the current task sequence step is completed. 如果设置任务序列变量,还需将 SMSTSRebootRequested 变量设置为 trueIf this task sequence variable is set, also set the SMSTSRebootRequested variable to true. 重新启动计算机后,任务序列管理器将返回运行相同的任务序列步骤。After the computer is restarted, the task sequence manager reruns the same task sequence step.

SMSTSRunCommandLineAsUserSMSTSRunCommandLineAsUser

从版本 2002 开始Starting in version 2002
适用于运行命令行步骤。Applies to the Run Command Line step.

使用任务序列变量来配置“运行命令行”步骤使用的用户上下文。Use task sequence variables to configure the user context for the Run Command Line step. 无需为“运行命令行”步骤配置占位符帐户,即可使用 SMSTSRunCommandLineUserNameSMSTSRunCommandLineUserPassword 变量。You don't need to configure the Run Command Line step with a placeholder account to use the SMSTSRunCommandLineUserName and SMSTSRunCommandLineUserPassword variables.

SMSTSRunCommandLineAsUser 配置为以下值之一:Configure SMSTSRunCommandLineAsUser with one of the following values:

  • true:任何后续“运行命令行”步骤都会以在 SMSTSRunCommandLineUserName 中指定的用户为上下文运行。true: Any further Run Command Line steps run in the context of the user specified in SMSTSRunCommandLineUserName.

  • false:任何后续“运行命令行”步骤都会在你为该步骤配置的上下文中运行。false: Any further Run Command Line steps run in the context that you configured on the step.

SMSTSRunCommandLineUserNameSMSTSRunCommandLineUserName

适用于运行命令行步骤。Applies to the Run Command Line step.

(input)(input)

指定运行命令行所依据的帐户。Specifies the account by which the command line is run. 此值为用户名或域\用户名形式的字符串。The value is a string of the form username or domain\username. 使用 SMSTSRunCommandLineUserPassword 变量指定帐户密码。Specify the account password with the SMSTSRunCommandLineUserPassword variable.

备注

从版本 2002 开始,可使用 SMSTSRunCommandLineAsUser 变量和此变量来配置此步骤使用的用户上下文。Starting in version 2002, use the SMSTSRunCommandLineAsUser variable with this variable to configure the user context for this step.

在版本 1910 及更早版本中,请配置“运行命令行”步骤,设置为“作为以下帐户运行此步骤” 。In version 1910 and earlier, configure the Run Command Line step with the setting to Run this step as the following account. 如果启用此选项,则请在使用变量设置用户名和密码时,为该帐户指定任意值。When you enable this option, if you're setting the user name and password with variables, specify any value for the account.

有关任务序列运行方式帐户的详细信息,请参阅帐户For more information on the task sequence run-as account, see Accounts.

SMSTSRunCommandLineUserPasswordSMSTSRunCommandLineUserPassword

适用于运行命令行步骤。Applies to the Run Command Line step.

(input)(input)

SMSTSRunCommandLineUserName 变量所指定的帐户指定密码。Specifies the password for the account specified by the SMSTSRunCommandLineUserName variable.

SMSTSRunPowerShellAsUserSMSTSRunPowerShellAsUser

从版本 2002 开始Starting in version 2002
适用于运行 PowerShell 脚本步骤。Applies to the Run PowerShell Script step.

使用任务序列变量来配置“运行 PowerShell 脚本”步骤使用的用户上下文。Use task sequence variables to configure the user context for the Run PowerShell Script step. 无需为“运行 PowerShell 脚本”步骤配置占位符帐户,即可使用 SMSTSRunPowerShellUserNameSMSTSRunPowerShellUserPassword 变量。You don't need to configure the Run PowerShell Script step with a placeholder account to use the SMSTSRunPowerShellUserName and SMSTSRunPowerShellUserPassword variables.

SMSTSRunPowerShellAsUser 配置为以下值之一:Configure SMSTSRunPowerShellAsUser with one of the following values:

  • true:任何后续“运行 PowerShell 脚本”步骤都会在 SMSTSRunPowerShellUserName 中指定的用户的上下文中运行。true: Any further Run PowerShell Script steps run in the context of the user specified in SMSTSRunPowerShellUserName.

  • false:任何后续“运行 PowerShell 脚本”步骤都会在你为该步骤配置的上下文中运行。false: Any further Run PowerShell Script steps run in the context that you configured on the step.

SMSTSRunPowerShellUserNameSMSTSRunPowerShellUserName

适用于运行 PowerShell 脚本步骤。Applies to the Run PowerShell Script step.

(input)(input)

指定运行 PowerShell 脚本所依据的帐户。Specifies the account by which the PowerShell script is run. 此值为用户名或域\用户名形式的字符串。The value is a string of the form username or domain\username. 使用 SMSTSRunPowerShellUserPassword 变量指定帐户密码。Specify the account password with the SMSTSRunPowerShellUserPassword variable.

备注

要使用这些变量,请配置“运行 PowerShell 脚本”步骤,设置为“作为以下帐户运行此步骤” 。To use these variables, configure the Run PowerShell Script step with the setting to Run this step as the following account. 如果启用此选项,则请在使用变量设置用户名和密码时,为该帐户指定任意值。When you enable this option, if you're setting the user name and password with variables, specify any value for the account.

有关任务序列运行方式帐户的详细信息,请参阅帐户For more information on the task sequence run-as account, see Accounts.

SMSTSRunPowerShellUserPasswordSMSTSRunPowerShellUserPassword

适用于运行 PowerShell 脚本步骤。Applies to the Run PowerShell Script step.

(input)(input)

SMSTSRunPowerShellUserName 变量所指定的帐户指定密码。Specifies the password for the account specified by the SMSTSRunPowerShellUserName variable.

SMSTSSoftwareUpdateScanTimeoutSMSTSSoftwareUpdateScanTimeout

适用于安装软件更新步骤。Applies to the Install Software Updates step.

(input)(input)

控制此步骤中软件更新扫描的超时。Control the timeout for the software updates scan during this step. 例如,如果预计在扫描期间有大量更新,则增加该值。For example, if you expect numerous updates during the scan, increase the value. 默认值为 3600 秒(60 分钟)。The default value is 3600 seconds (60 minutes). 变量值以秒为单位。The variable value is set in seconds.

SMSTSUDAUsersSMSTSUDAUsers

通过使用以下格式指定目标计算机的主要用户:<DomainName>\<UserName>Specifies the primary users of the destination computer by using the following format: <DomainName>\<UserName>. 使用逗号 (,) 分隔多个用户。Separate multiple users by using a comma (,). 有关详细信息,请参阅将用户与目标计算机相关联For more information, see Associate users with a destination computer.

示例Example

contoso\jqpublic, contoso\megb, contoso\janedoh

SMSTSWaitCcmexecOperationalTimeoutSMSTSWaitCcmexecOperationalTimeout

(input)(input)

从版本 1910 开始,使用此变量控制任务序列等待 SMS 代理主机服务 (ccmexec) 完全启动的超时时间。Starting in version 1910, use this variable to control the timeout period for the task sequence to wait for the SMS Agent Host service (ccmexec) to completely start. 以秒为单位指定此值。Specify this value in seconds. 默认超时时间为 30 分钟,即 1800 秒。The default timeout period is 30 minutes, or 1800 seconds.

SMSTSWaitCcmexecOperationalTimeout 示例Examples of SMSTSWaitCcmexecOperationalTimeout

  • 1800(默认值):30 分钟1800 (default): 30 minutes
  • 300:任务序列会等待 5 分钟,让 ccmexec 启动300: The task sequence waits five minutes for ccmexec to start

SMSTSWaitForSecondRebootSMSTSWaitForSecondReboot

适用于安装软件更新步骤。Applies to the Install Software Updates step.

(input)(input)

可使用这一可选的任务序列变量在软件更新安装需要两次重启时控制客户端行为。This optional task sequence variable controls client behavior when a software update installation requires two restarts. 在此步骤之前设置此变量,以防软件更新安装的第二次重启导致任务序列失败。Set this variable before this step to prevent a task sequence from failing because of a second restart from software update installation.

设置 SMSTSWaitForSecondReboot 值(以秒为单位),指定在此步骤中,任务序列在计算机重启时的暂停的秒数。Set the SMSTSWaitForSecondReboot value in seconds to specify how long the task sequence pauses on this step while the computer restarts. 预留充足的时间,以防还有第二次重启。Allow sufficient time in case there's a second restart.

例如,如果将 SMSTSWaitForSecondReboot 设置为 600,重启后任务序列将暂停 10 分钟,然后再运行其他步骤。For example, if you set SMSTSWaitForSecondReboot to 600, the task sequence pauses for 10 minutes after a restart before additional steps run. 当单个安装软件更新任务序列步骤中需安装数百个软件更新时,这一变量十分有用。This variable is useful when a single Install Software Updates task sequence step installs hundreds of software updates.

备注

此变量仅适用于会部署操作系统的任务序列。This variable only applies to a task sequence that deploys an OS. 它不适用于自定义任务序列。It doesn't work in a custom task sequence.

TSDebugModeTSDebugMode

从版本 1906 开始,在部署任务序列的集合或计算机对象上将此变量设置为 TRUEStarting in version 1906, set this variable to TRUE on a collection or computer object to which the task sequence is deployed. 设置了此变量的任何设备都会将部署给它的所有任务序列置于调试模式下。Any device that has this variable set will put any task sequence deployed to it into debug mode.

有关详细信息,请参阅调试任务序列For more information, see Debug a task sequence.

TSDebugOnErrorTSDebugOnError

从版本 1910 开始,将此变量设置为 TRUE,以便在任务序列返回错误时自动启动任务序列调试器Starting in version 1910, set this variable to TRUE to automatically start the task sequence debugger when the task sequence returns an error.

通过以下内容设置此变量:Set this variable using:

TSDisableProgressUITSDisableProgressUI

使用此变量控制任务序列何时向最终用户显示进度。Use this variable to control when the task sequence displays progress to end users. 若要在不同时间隐藏或显示进度,请在一个任务序列中多次设置此变量。To hide or display progress at different times, set this variable multiple times in a task sequence.

  • true:隐藏任务序列进度true: Hide task sequence progress

  • false:显示任务序列进度false: Display task sequence progress

TSErrorOnWarningTSErrorOnWarning

适用于安装应用程序步骤。Applies to the Install Application step.

(input)(input)

指定任务序列引擎是否在此步骤中将检测到的警告视为错误。Specify whether the task sequence engine considers a detected warning as an error during this step. 由于未满足要求而导致一个或多个应用程序或所需的依赖项未安装时,任务序列会将 _TSAppInstallStatus 变量设置为 WarningThe task sequence sets the _TSAppInstallStatus variable to Warning when one or more applications, or a required dependency, didn't install because it didn't meet a requirement. 将此变量设置为 True 时,如果任务序列将 _TSAppInstallStatus 设置为 Warning,结果会出错。When you set this variable to True, and the task sequence sets _TSAppInstallStatus to Warning, the outcome is an error. False 是默认行为。A value of False is the default behavior.

TSProgressInfoLevelTSProgressInfoLevel

从版本 2002 开始Starting in version 2002

指定此变量可控制任务序列进度窗口所显示的信息类型。Specify this variable to control the type of information that the task sequence progress window displays. 请采用以下变量值:Use the following values for this variable:

  • 1:在进度文本中包括当前步骤和步骤总数。1: Include the current step and total steps to the progress text. 例如“第 2 步,共 10 步”。For example, 2 of 10.
  • 2:包括当前步骤、步骤总数和完成百分比。2: Include the current step, total steps, and percentage completed. 例如“第 2 步,共 10 步(已完成 20%)”。For example, 2 of 10 (20% complete).
  • 3:包含已完成的百分比。3: Include the percentage completed. 例如“(已完成 20%)”。For example, (20% complete).

TSUEFIDriveTSUEFIDrive

“变量”字段中 FAT32 分区属性的用法。Use on the properties of a FAT32 partition in the Variable field. 当任务序列检测到此变量时,它将为转换到 UEFI 准备驱动器,准备就绪后会重启计算机。When the task sequence detects this variable, it prepares the disk for transition to UEFI before it restarts the computer. 有关详细信息,请参阅用于实现从 BIOS 到 UEFI 的转换的任务序列步骤For more information, see Task sequence steps to manage BIOS to UEFI conversion.

WorkingDirectoryWorkingDirectory

适用于运行命令行步骤。Applies to the Run Command Line step.

(input)(input)

指定命令行操作的开始目录。Specifies the starting directory for a command-line action. 指定的目录名称不能超过 255 个字符。The specified directory name can't exceed 255 characters.

示例Examples

  • C:\
  • %SystemRoot%

不推荐使用的变量Deprecated variables

不推荐使用以下变量:The following variables are deprecated:

  • OSDAllowUnsignedDriver :部署 Windows Vista 和更高版本的操作系统时不使用此变量OSDAllowUnsignedDriver : Isn't used when deploying Windows Vista and later operating systems
  • OSDBuildStorageDriverList :仅适用于 Windows XP 和 Windows Server 2003OSDBuildStorageDriverList : Only applies to Windows XP and Windows Server 2003
  • OSDDiskpartBiosCompatibilityMode :部署 Windows XP 或 Windows Server 2003 时才需要此变量OSDDiskpartBiosCompatibilityMode : Only needed when deploying Windows XP or Windows Server 2003
  • OSDInstallEditionIndex :Windows Vista 之后的版本不需要此变量OSDInstallEditionIndex : Not needed post-Windows Vista
  • OSDPreserveDriveLetter :有关详细信息,请参阅 OSDPreserveDriveLetterOSDPreserveDriveLetter : For more information, see OSDPreserveDriveLetter

OSDPreserveDriveLetterOSDPreserveDriveLetter

重要

此任务序列变量已被弃用。This task sequence variable is deprecated.

在操作系统部署期间,默认情况下,Windows 安装程序会确定要使用的最佳驱动器号(通常为 C:)。During an OS deployment, by default, Windows Setup determines the best drive letter to use (typically C:).

上一行为:应用映像时,OSDPreverveDriveLetter 变量确定任务序列是否使用在映像文件 (WIM) 中捕获的驱动器号。Previous behavior : when applying an image, the OSDPreverveDriveLetter variable determines whether the task sequence uses the drive letter captured in the image file (WIM). 可以将此变量的值设置为 false 以使用为“应用操作系统”任务序列步骤中的“目标”设置指定的位置。Set the value for this variable to false to use the location that you specify for the Destination setting in the Apply Operating System task sequence step. 有关详细信息,请参阅应用 OS 映像For more information, see Apply OS image.

另请参阅See also