How to generate computername using MDT and ConfigMgr By Lars Halvorsen On 2013-04-01 Leave a Comment In Boot Image, MDT, OSD, SCCM 2012, SQL There are several other blogs out there explaining how to do this in MDT 2010. Ok, I need some help. I have managed to get our deployment share to function the way that I want it too specially when it comes to naming the computers automatically as part of the customsettings.ini part. The environment is mainly lenovo workstations and I managed to get the OSDCOMPUTERNAME to. Wrong forum mate, but have a read here NOTE: I don't.
Hello Everyone, I've been working on a zero touch installation of SystemCenter to reduce the amount of time my techs need to be onsite, but i'm having an issue with one part of the task sequence. I have 2 task sequences configured 2 different ways to do this neither were sucessful. The first runs some powershell scripts during the task sequence. The first sets the Exception Policy the second tells it to run this script. $AssetTag = (Get-WmiObject -Class Win32SystemEnclosure Select-Object SMBiosAssetTag).SMBiosAssetTag $OSDComputerName = $AssetTag $TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment $TSEnv.Value('OSDComputerName') = '$OSDComputerName' This results in a failure during the task sequence and Windows goes into a boot loop error logging is difficult. Same script as previous $AssetTag = (Get-WmiObject -Class Win32SystemEnclosure Select-Object SMBiosAssetTag).SMBiosAssetTag $OSDComputerName = $AssetTag $TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment $TSEnv.Value('OSDComputerName') = '$OSDComputerName' This is the error i get from looking at the task sequence logs.
052/sccm?/Set-OSDComputerName.ps1 range 0-253 Downloaded file from SetOSDComputername.ps1 to C: SMSTaskSequence Packages LPS00052 Set-OSDComputerName.ps1 VerifyContentHash:Hash algorithm is 32780 Content successfully downloaded at C: SMSTaskSequence Packages LPS00052. Resolved source to 'C: SMSTaskSequence Packages LPS00052' Command line for extension.exe is '%1'%. Set command line: Run Powershell script Working dir 'C: SMSTaskSequence Packages LPS00052' Executing command line: Run Powershell script Process completed with exit code Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved.
楗摮睯潐敷卲敨汬䌠灯特杩瑨Command line returned ReleaseSource for C: SMSTaskSequence Packages LPS00052. Reference count 1 for the source C: SMSTaskSequence Packages LPS00052 before releasing Released the resolved source C: SMSTaskSequence Packages LPS00052 T Exitcode- 196608 The one other error i recall it was complaining about not being able to set that tsev com value above. If anyone can help i'd greatly appreciate it! Edited Jul 16, 2018 at 19:13 UTC. I tried again as you requested. Please see the error below.
(Powershell setting the execution bypass sucessfully). Le /SMSDPSMSPKG$/LPS00052/sccm?/Set-OSDComputerName.ps1 range 0-253 Downloaded file from SetOSDComputerName.ps1 to C: SMSTaskSequence Packages LPS00052 Set-OSDComputerName.ps1 VerifyContentHash: Hash algorithm is 32780 Content successfully downloaded at C: SMSTaskSequence Packages LPS00052. Resolved source to 'C: SMSTaskSequence Packages LPS00052' Command line for extension.exe is '%1'%. Set command line: Run command line Working dir 'C: SMSTaskSequence Packages LPS00052' Executing command line: Run command line Process completed with exit code 0 Command line X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command 'Set-ExecutionPolicy Bypass LocalMachine' -force returned 0 ReleaseSource for C: SMSTaskSequence Packages LPS00052. Reference count 1 for the source C: SMSTaskSequence Packages LPS00052 before releasing Released the resolved source C: SMSTaskSequence Packages LPS00052. (Powershell failing to Set-OSDComputerName). Le /SMSDPSMSPKG$/LPS00052/sccm?/Set-OSDComputerName.ps1 range 0-253 Downloaded file from Set-OSDComputerName.ps1 to C: SMSTaskSequence Packages LPS00052 Set-OSDComputerName.ps1 VerifyContentHash: Hash algorithm is 32780 Content successfully downloaded at C: SMSTaskSequence Packages LPS00052.
Resolved source to 'C: SMSTaskSequence Packages LPS00052' Command line for extension.exe is '%1'%. Set command line: Run command line Working dir 'C: SMSTaskSequence Packages LPS00052' Executing command line: Run command line Process completed with exit code 0 Command line X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command 'Set-ExecutionPolicy Bypass LocalMachine' -force returned 0 ReleaseSource for C: SMSTaskSequence Packages LPS00052. Reference count 1 for the source C: SMSTaskSequence Packages LPS00052 before releasing Released the resolved source C: SMSTaskSequence Packages LPS00052. Swd.exe PackageID = 'LPS00052' BaseVar = ', ContinueOnError=' ProgramName = 'X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command OSDComputerName.ps1' SwdAction = '0001' ResolveSource flags: 0x00000000 SMSTSPersistContent:. The content for package LPS00052 will be persisted The package LPS00052 is found locally in the cache C: SMSTaskSequence Packages LPS00052 Resolved source to 'C: SMSTaskSequence Packages LPS00052' Command line for extension.exe is '%1'%.Set command line: Run command line Working dir 'C: SMSTaskSequence Packages LPS00052' Executing command line: Run command line Process completed with exit code 1 Command line X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command OSDComputerName.ps1 returned 1 ReleaseSource for C: SMSTaskSequence Packages LPS00052. Reference count 1 for the source C: SMSTaskSequence Packages LPS00052 before releasing Released the resolved source C: SMSTaskSequence Packages LPS00052 O Edited Jul 16, 2018 at 19:54 UTC.
Reattempted like you asked and here is the error result. Swd.exe PackageID = 'LPS00052' BaseVar = ', ContinueOnError=' ProgramName = 'X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command OSDComputerName.ps1' SwdAction = '0001' ResolveSource flags: 0x00000000 SMSTSPersistContent:. The content for package LPS00052 will be persisted The package LPS00052 is found locally in the cache C: SMSTaskSequence Packages LPS00052 Resolved source to 'C: SMSTaskSequence Packages LPS00052' Command line for extension.exe is '%1'%.Set command line: Run command line Working dir 'C: SMSTaskSequence Packages LPS00052' Executing command line: Run command line Process completed with exit code 1 Command line X: WINDOWS system32 WindowsPowershell v1.0 powershell.exe -noprofile -command OSDComputerName.ps1 returned 1 ReleaseSource for C: SMSTaskSequence Packages LPS00052.
Reference count 1 for the source C: SMSTaskSequence Packages LPS00052 before releasing Released the resolved source C: SMSTaskSequence Packages LPS00052 O. Another helpful error message. I don’t have SCCM, but FWIW, I’ve always run powershell scripts from MDT’s Scripts folder (because a script invoked from%scriptroot% runs as admin by default) That said, I’d pare it back to bare minimum to troubleshoot - a 2 liner: $TSEnv = New-Object -COMObject Microsoft.SMS.TSEnvironment $TSEnv.Value(‘OSDComputerName’) = 'TestOne' If that takes, you know it’s a problem with your variable. In the alternative, you could throw in a suspend task sequence step, run your script manually, and see what turns up in the immediate window.
At least that way you can see what’s going on.
Task sequence variables in Configuration Manager. 36 minutes to read.
Contributors. In this article Applies to: System Center Configuration Manager (Current Branch) This article is a reference for all of the available variables in alphabetical order. 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 includes the list of variables specific to each step.
For more information, see. Task sequence variable reference OSDDetectedWinDir The task sequence scans the computer's hard drives for a previous operating system installation when Windows PE starts.
The Windows folder location 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 Windows folder location to use for the new operating system installation. OSDDetectedWinDrive 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 Applies to the step.
(input) Specifies the package ID of the Configuration Manager package that contains the USMT files. This variable is required.
OSDMigrateUsmtRestorePackageID Applies to the step. (input) Specifies the package ID of the Configuration Manager package that contains the USMT files. This variable is required. SMSTSAdvertID Stores the current running task sequence deployment unique 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 Applies to the step. Specifies the asset tag for the computer.
SMSTSBootImageID 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 The task sequence sets this variable when it detects a computer that's in UEFI mode. SMSTSClientGUID 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 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 Applies to the step. Specifies the default gateways used by the computer. SMSTSDownloadOnDemand If 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 When 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 Applies to the step. Specifies the IP addresses used by the computer. SMSTSLastActionName Starting in version 1810 Stores the name of the last action that was run.
This variable relates to SMSTSLastActionRetCode. 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 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. If the last step succeeded, this variable is true. If the last step failed, it's 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. SMSTSLaunchMode Specifies that the task sequence started via one of the following methods:. SMS: The Configuration Manager client, such as when a user starts it from Software Center. UFD: Legacy USB media. UFD+FORMAT: Newer USB media.
CD: A bootable CD. DVD: A bootable DVD. PXE: Network boot with PXE.
HD: Prestaged media on a hard disk 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 Applies to the step. Specifies the MAC addresses used by the computer. SMSTSMachineName Stores and specifies the computer name. Stores the name of the computer that the task sequence uses to log all status messages. To change the computer name in the new OS, use the variable.
SMSTSMake Applies to the step. Specifies the make of the computer. SMSTSMDataPath Specifies the path defined by the variable. 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 Specifies the type of media that's used to initiate the installation. Examples of types of media are Boot Media, Full Media, PXE, and Prestaged Media.
SMSTSModel Applies to the step. Specifies the model of the computer. SMSTSMP Stores the URL or IP address of a Configuration Manager management point.
SMSTSMPPort Stores the port number of a Configuration Manager management point. SMSTSOrgName Stores the branding title name that the task sequence displays in the progress dialog. SMSTSOSUpgradeActionReturnCode Applies to the step. Stores the exit code value that Windows Setup returns to indicate success or failure. 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 Stores the current running task sequence ID. This ID uses the same format as a Configuration Manager package ID. Example HJT00001 SMSTSPackageName Stores the current running task sequence name.
A Configuration Manager administrator specifies this name when creating the task sequence. Example Deploy Windows 10 task sequence SMSTSRunFromDP Set 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 Applies to the step. Specifies the serial number of the computer. SMSTSSetupRollback Specifies whether Windows Setup performed a rollback operation during an in-place upgrade. The variable values can be true or false.
SMSTSSiteCode Stores the site code of the Configuration Manager site. Example ABC 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 Specifies the type of the current running task sequence. It can have one of the following values:.
1: A generic task sequence. 2: An OS deployment task sequence SMSTSUseCRL When the task sequence uses HTTPS to communicate with the management point, this variable specifies whether it uses the certificate revocation list (CRL). SMSTSUserStarted Specifies whether a user started the task sequence.
This variable is set only if the task sequence is started from Software Center. For example, if is set to SMS. This variable can have the following values:. true: Specifies that the task sequence is manually started by a user from Software Center. false: Specifies that the task sequence is initiated automatically by the Configuration Manager scheduler.
SMSTSUseSSL Specifies whether the task sequence uses SSL to communicate with the Configuration Manager management point. If you configure your site systems for HTTPS, the value is set to true. SMSTSUUID Applies to the step. Specifies the UUID of the computer. SMSTSWTG Specifies if the computer is running as a Windows To Go device.
TSAppInstallStatus The task sequence sets this variable with the installation status for the application during the step. It sets one of the following values:. 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. OSDAdapter Applies to the step. (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.
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. 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: OSDAdapter0EnableDHCP This setting is required. Possible values are True or False. For example: true: enable Dynamic Host Configuration Protocol (DHCP) for the adapter OSDAdapter0IPAddressList Comma-delimited list of IP addresses for the adapter. This property is ignored unless EnableDHCP is set to false.
This setting is required. OSDAdapter0SubnetMask Comma-delimited list of subnet masks. This property is ignored unless EnableDHCP is set to false.
This setting is required. OSDAdapter0Gateways Comma-delimited list of IP gateway addresses. This property is ignored unless EnableDHCP is set to false. This setting is required. OSDAdapter0DNSDomain Domain Name System (DNS) domain for the adapter.
OSDAdapter0DNSServerList Comma-delimited list of DNS servers for the adapter. This setting is required. OSDAdapter0EnableDNSRegistration Set to true to register the IP address for the adapter in DNS. OSDAdapter0EnableFullDNSRegistration Set to true to register the IP address for the adapter in DNS under the full DNS name for the computer. OSDAdapter0EnableIPProtocolFiltering Set to true to enable IP protocol filtering on the adapter. OSDAdapter0IPProtocolFilterList Comma-delimited list of protocols allowed to run over IP.
This property is ignored if EnableIPProtocolFiltering is set to false. OSDAdapter0EnableTCPFiltering Set to true to enable TCP port filtering for the adapter.
OSDAdapter0TCPFilterPortList Comma-delimited list of ports to be granted access permissions for TCP. This property is ignored if EnableTCPFiltering is set to false. OSDAdapter0TcpipNetbiosOptions Options for NetBIOS over TCP/IP. Possible values are as follows:. 0: Use NetBIOS settings from DHCP server. 1: Enable NetBIOS over TCP/IP. 2: Disable NetBIOS over TCP/IP OSDAdapter0EnableWINS Set to true to use WINS for name resolution.
OSDAdapter0WINSServerList Comma-delimited list of WINS server IP addresses. This property is ignored unless EnableWINS is set to true.
OSDAdapter0MacAddress MAC address used to match settings to the physical network adapter. OSDAdapter0Name The name of the network connection as it appears in the network connections control panel program. The name is between 0 and 255 characters long. OSDAdapter0Index Index of the network adapter settings in the array of settings.
Example. OSDAdapterCount = 1. OSDAdapter0EnableDHCP = FALSE. OSDAdapter0IPAddressList = 192.168.0.40. OSDAdapter0SubnetMask = 255.255.255.0. OSDAdapter0Gateways = 192.168.0.1. OSDAdapter0DNSSuffix = contoso.com OSDAdapterCount Applies to the step.
(input) Specifies the number of network adapters installed on the destination computer. When you set the OSDAdapterCount value, also set all the configuration options for each adapter. For example, if you set the OSDAdapter0TCPIPNetbiosOptions value for the first adapter, then you must configure all the values for that adapter. If you don't specify this value, the task sequence ignores all OSDAdapter values.
OSDApplyDriverBootCriticalContentUniqueID Applies to the step. (input) 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. OSDApplyDriverBootCriticalHardwareComponent Applies to the step. (input) Specifies whether a mass storage device driver is installed, this variable must be scsi. If is set, this variable is required. OSDApplyDriverBootCriticalID Applies to the step. (input) Specifies the boot critical ID of the mass storage device driver to install. This ID is listed in the scsi section of the device driver's txtsetup.oem file.
If is set, this variable is required. OSDApplyDriverBootCriticalINFFile Applies to the step. (input) Specifies the INF file of the mass storage driver to install.
If is set, this variable is required. OSDAutoApplyDriverBestMatch Applies to the step.
(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 (default): Only install the best device driver. false: Installs all compatible device drivers, and Windows chooses the best driver to use OSDAutoApplyDriverCategoryList Applies to the step. (input) 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.
Obtain the available category IDs by enumerating the list of SMSCategoryInstance objects on the site. OSDBitLockerRecoveryPassword Applies to the step. (input) Instead of generating a random recovery password, the Enable BitLocker step uses the specified value as the recovery password. The value must be a valid numerical BitLocker recovery password. OSDBitLockerStartupKey Applies to the step.
(input) 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. The value must be a valid, 256-bit Base64-encoded BitLocker startup key. OSDCaptureAccount Applies to the step.
(input) Specifies a Windows account name that has permissions to store the captured image on a network share. Also specify the. For more information on the capture OS image account, see.
OSDCaptureAccountPassword Applies to the step. (input) Specifies the password for the Windows account used to store the captured image on a network share. OSDCaptureDestination Applies to the step. (input) Specifies the location where the task sequence saves the captured OS image. The maximum directory name length is 255 characters.
If the network share requires authentication, specify the and variables. OSDComputerName (input) Applies to the step. Specifies the name of the destination computer. Example%SMSTSMachineName% (default) OSDComputerName (output) Applies to the step. Set to the NetBIOS name of the computer.
The value is set only if the variable is set to true. OSDConfigFileName Applies to the step. (input) Specifies the file name of the OS deployment answer file associated with the OS deployment image package. OSDDataImageIndex Applies to the step. (input) Specifies the index value of the image that's applied to the destination computer. OSDDiskIndex Applies to the step.
(input) Specifies the physical disk number to be partitioned. OSDDNSDomain Applies to the step. (input) Specifies the primary DNS server that the destination computer uses.
OSDDNSSuffixSearchOrder Applies to the step. (input) Specifies the DNS search order for the destination computer. OSDDomainName Applies to the step. (input) Specifies the name of the Active Directory domain that the destination computer joins. The specified value must be a valid Active Directory Domain Services domain name.
OSDDomainOUName Applies to the step. (input) 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 OSDDoNotLogCommand Starting in version 1806 Applies to the step. (input) To prevent potentially sensitive data from being displayed or logged, set this variable to TRUE. This variable masks the program name in the smsts.log during a task sequence step. OSDEnableTCPIPFiltering Applies to the step. (input) Specifies whether TCP/IP filtering is enabled. Valid values.
true. false (default) OSDGPTBootDisk Applies to the step. (input) Specifies whether to create an EFI partition on a GPT hard disk. EFI-based computers use this partition as the startup disk. Valid values.
true. false (default) OSDImageCreator Applies to the step. (input) An optional name of the user who created the image. This name is stored in the WIM file. The maximum length of the user name is 255 characters. OSDImageDescription Applies to the step.
(input) An optional user-defined description of the captured OS image. This description is stored in the WIM file. The maximum length of the description is 255 characters. OSDImageIndex Applies to the step. (input) Specifies the image index value of the WIM file that's applied to the destination computer. OSDImageVersion Applies to the step.
(input) An optional user-defined version number to assign to the captured OS image. This version number is stored in the WIM file. This value can be any combination of alphanumeric characters with a maximum length of 32. OSDInstallDriversAdditionalOptions Starting in version 1806 Applies to the step. (input) 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. To use this variable, enable the setting, Install driver package via running DISM with recurse option, on the Apply Driver Package step.
For more information, see. OSDJoinAccount Applies to the following steps:. (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.
OSDJoinDomainName Applies to the step. (input) Specifies the name of an Active Directory domain the destination computer joins. The length of the domain name must be between 1 and 255 characters. OSDJoinDomainOUName Applies to the step. (input) 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. The length of the OU name must be between 0 and 32,767 characters. This value isn't set if the variable is set to 1 (join workgroup). Example LDAP://OU=MyOu,DC=MyDom,DC=MyCompany,DC=com OSDJoinPassword Applies to the following steps:. (input) Specifies the password for the that the destination computer uses to join the Active Directory domain. If the task sequence environment doesn't include this variable, then Windows Setup tries a blank password. If the variable variable is set to 0 (join domain), this value is required.
OSDJoinSkipReboot Applies to the step. (input) Specifies whether to skip restarting after the destination computer joins the domain or workgroup. Valid values.
true. false OSDJoinType Applies to the step. (input) Specifies whether the destination computer joins a Windows domain or a workgroup. Valid values.
0: Join the destination computer to a Windows domain. 1: Join the destination computer to a workgroup OSDJoinWorkgroupName Applies to the step. (input) Specifies the name of a workgroup that the destination computer joins. The length of the workgroup name must be between 1 and 32 characters. OSDKeepActivation Applies to the step. (input) Specifies whether sysprep resets the product activation flag. Valid values.
true. false (default) OSDLocalAdminPassword Applies to the step. (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.
The specified value must be between 1 and 255 characters. OSDMigrateAdapterSettings Applies to the step. (input) Specifies whether the task sequence captures the network adapter information. This information includes configuration settings for TCP/IP, DNS, and WINS. Valid values. true (default). false OSDMigrateAdditionalCaptureOptions Applies to the step.
(input) 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. Specify these options as a string, which the task sequence appends to the automatically generated USMT command line for ScanState. The USMT options specified with this task sequence variable aren't validated for accuracy prior to running the task sequence. For more information on available options, see. OSDMigrateAdditionalRestoreOptions Applies to the step.
(input) Specifies additional command-line options for the user state migration tool (USMT) that the task sequence uses when restoring the user state. Specify the additional options as a string, which the task sequence appends to the automatically generated USMT command line for LoadState. The USMT options specified with this task sequence variable aren't validated for accuracy prior to running the task sequence.
For more information on available options, see. OSDMigrateComputerName Applies to the step. (input) Specifies whether the computer name is migrated. Valid values. true (default). The variable is set to the NetBIOS name of the computer. false OSDMigrateConfigFiles Applies to the step.
(input) Specifies the configuration files used to control the capture of user profiles. This variable is used only if is set to Advanced.
This comma-delimited list value is set to perform customized user profile migration. Example miguser.xml,migsys.xml,migapps.xml OSDMigrateContinueOnLockedFiles Applies to the step. (input) If USMT can't capture some files, this variable allows the user state capture to proceed. Valid values. true (default). false OSDMigrateContinueOnRestore Applies to the step.
(input) Continue the process, even if USMT can't restore some files. Valid values. true (default). false OSDMigrateEnableVerboseLogging Applies to the following steps:. (input) Enables verbose logging for USMT. The step requires this value.
Valid values. true. false (default) OSDMigrateLocalAccounts Applies to the step.
(input) Specifies whether the local computer account is restored. Valid values. true.
false (default) OSDMigrateLocalAccountPassword Applies to the step. (input) If the variable is true, this variable must contain the password assigned to all migrated local accounts. USMT assigns the same password to all migrated local accounts. Consider this password as temporary, and change it later by some other method. OSDMigrateMode Applies to the step.
(input) Allows you to customize the files that USMT captures. Valid values. Simple: The task sequence only uses the standard USMT configuration files.
Advanced: The task sequence variable specifies the configuration files that USMT uses OSDMigrateNetworkMembership Applies to the step. (input) Specifies whether the task sequence migrates the workgroup or domain membership information.
Valid values. true (default). false OSDMigrateRegistrationInfo Applies to the step. (input) Specifies whether the step migrates user and organization information. Valid values. true (default). The variable is set to the registered organization name of the computer.
false OSDMigrateSkipEncryptedFiles Applies to the step. (input) Specifies whether encrypted files are captured. Valid values. true. false (default) OSDMigrateTimeZone Applies to the step. (input) Specifies whether the computer time zone is migrated.
Valid values. true (default). The variable is set to the time zone of the computer. false OSDNetworkJoinType Applies to the step. (input) Specifies whether the destination computer joins an Active Directory domain or a workgroup. Value values. 0: Join an Active Directory domain.
1: Join a workgroup OSDPartitions Applies to the step. (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: OSDPartitions0Type Specifies the type of partition. This property is required. Valid values are Primary, Extended, Logical, and Hidden. OSDPartitions0FileSystem 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.
Valid values are FAT32 and NTFS. OSDPartitions0Bootable Specifies whether the partition is bootable. This property is required.
If this value is set to TRUE for MBR disks, then the step marks this partition as active. OSDPartitions0QuickFormat Specifies the type of format that is used. This property is required. If this value is set to TRUE, the step performs a quick format. Otherwise, the step performs a full format. OSDPartitions0VolumeName Specifies the name that's assigned to the volume when it's formatted. This property is optional.
OSDPartitions0Size 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. Units are specified by the OSDPartitions0SizeUnits variable. OSDPartitions0SizeUnits The step uses these units to interpret the OSDPartitions0Size variable.
This property is optional. Valid values are MB (default), GB, and Percent. OSDPartitions0VolumeLetterVariable 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. 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.
For example: OSDPartitions1Type, OSDPartitions1FileSystem, OSDPartitions1Bootable, OSDPartitions1QuickFormat, and OSDPartitions1VolumeName. OSDPartitionStyle Applies to the step. (input) Specifies the partition style to use when partitioning the disk. Valid values.
GPT: Use the GUID Partition Table style. MBR: Use the master boot record partition style OSDProductKey Applies to the step. (input) Specifies the Windows product key. The specified value must be between 1 and 255 characters. OSDRandomAdminPassword Applies to the step. (input) Specifies a randomly generated password for the local Administrator account in the new OS. Valid values.
true (default): Windows Setup disables the local Administrator account on the target computer. false: Windows Setup enables the local administrator account on the target computer, and sets the account password to the value of OSDRegisteredOrgName (input) Applies to the step. Specifies the default registered organization name in the new OS. The specified value must be between 1 and 255 characters. OSDRegisteredOrgName (output) Applies to the step.
Set to the registered organization name of the computer. The value is set only if the variable is set to true.
OSDRegisteredUserName Applies to the step. (input) Specifies the default registered user name in the new OS. The specified value must be between 1 and 255 characters. OSDServerLicenseConnectionLimit Applies to the step.
(input) Specifies the maximum number of connections allowed. The specified number must be in the range between 5 and 9999 connections. OSDServerLicenseMode Applies to the step. (input) Specifies the Windows Server license mode that's used. Valid values.
PerSeat. PerServer OSDSetupAdditionalUpgradeOptions Applies to the step. (input) 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. For more information, see. OSDStateFallbackToNAA Applies to the step. (input) 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. Valid values. true.
false (default) OSDStateSMPRetryCount Applies to the step. (input) Specifies the number of times that the task sequence step tries to find a state migration point before the step fails. The specified count must be between 0 and 600.
OSDStateSMPRetryTime Applies to the step. (input) Specifies the number of seconds that the task sequence step waits between retry attempts. The number of seconds can be a maximum of 30 characters. OSDStateStorePath Applies to the following steps:. (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.
OSDTargetSystemDrive Applies to the step. (output) Specifies the drive letter of the partition that contains the OS files after the image is applied. OSDTargetSystemRoot (input) Applies to the step. Specifies the path to the Windows directory of the installed OS on the reference computer. The task sequence verifies it as a supported OS for capture by Configuration Manager. OSDTargetSystemRoot (output) Applies to the step. Specifies the path to the Windows directory of the installed OS on the reference computer.
The task sequence verifies it as a supported OS for capture by Configuration Manager. OSDTimeZone (input) Applies to the step. Specifies the default time zone setting that's used in the new OS.
OSDTimeZone (output) Applies to the step. Set to the time zone of the computer. The value is set only if the variable is set to true. OSDWipeDestinationPartition Applies to the step. (input) Specifies whether to delete the files located on the destination partition.
Valid values. true (default). false OSDWorkgroupName Applies to the step. (input) Specifies the name of the workgroup that the destination computer joins. Specify either this variable or the variable.
The workgroup name can be a maximum of 32 characters. SMSClientInstallProperties Applies to the step. (input) Specifies the client installation properties that the task sequence uses when installing the Configuration Manager client. For more information, see. SMSConnectNetworkFolderAccount Applies to the step.
(input) Specifies the user account that is used to connect to the network share in. Specify the account password with the value. For more information on the task sequence network folder connection account, see. SMSConnectNetworkFolderDriveLetter Applies to the step. (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.
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: SMSConnectNetworkFolderPassword Applies to the step. (input) Specifies the password for the that is used to connect to the network share in.
SMSConnectNetworkFolderPath Applies to the step. (input) Specifies the network path for the connection. If you need to map this path to a drive letter, use the value. Example server share SMSInstallUpdateTarget Applies to the step.
(input) Specifies whether to install all updates or only mandatory updates. Valid values. All. Mandatory SMSRebootMessage Applies to the step. (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. The specified message can't exceed 512 characters.
Example Save your work before the computer restarts. SMSRebootTimeout Applies to the step. (input) Specifies the number of seconds that the warning is displayed to the user before the computer restarts. Examples.
0 (default): Don't display a reboot message. 60: Display the warning for one minute SMSTSAssignmentsDownloadInterval The number of seconds to wait before the client attempts to download the policy since the last attempt that returned no policies. By default, the client waits 0 seconds before retrying. You can set this variable by using a prestart command from media or PXE.
SMSTSAssignmentsDownloadRetry The number of times a client attempts to download the policy after no policies are found on the first attempt. By default, the client retries 0 times. You can set this variable by using a prestart command from media or PXE. SMSTSAssignUsersMode Specifies how a task sequence associates users with the destination computer. Set the variable to one of the following values:. 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. Disabled: The task sequence doesn't associate users with the destination computer when it deploys the OS. SMSTSDisableStatusRetry 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. Starting in version 1802, 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. Note relies upon these status messages to display the progress, history, and details of each step.
SMSTSDisableWow64Redirection Applies to the step. (input) 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. This behavior allows the command to find 32-bit versions of OS programs and DLLs. Setting this variable to true disables the use of the WOW64 file system redirector. The command finds native 64-bit versions of OS programs and DLLs. This variable has no effect when running on a 32-bit OS.
SMSTSDownloadAbortCode This variable contains the abort code value for the external program downloader. This program is specified in the variable.
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. SMSTSDownloadProgram Use this variable to specify an alternate content provider (ACP). An ACP is a downloader program that's used to download content. 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. SMSTSDownloadRetryCount The number of times that Configuration Manager attempts to download content from a distribution point. By default, the client retries 2 times.
SMSTSDownloadRetryDelay The number of seconds that Configuration Manager waits before it retries to download content from a distribution point. By default, the client waits 15 seconds before retrying. SMSTSDriverRequestConnectTimeOut Applies to the step. 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. By default, the timeout is set to 60 seconds. SMSTSDriverRequestReceiveTimeOut Applies to the 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.
By default, the timeout is set to 480 seconds. SMSTSDriverRequestResolveTimeOut Applies to the step. 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.
By default, the timeout is set to 60 seconds. SMSTSDriverRequestSendTimeOut Applies to the 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.
By default, the timeout is set to 60 seconds. SMSTSErrorDialogTimeout 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. By default, this value is 900 seconds (15 minutes). SMSTSLanguageFolder Use this variable to change the display language of a language neutral boot image. SMSTSLocalDataDrive Specifies where the task sequence stores temporary files on the destination computer while it's running.
Set this variable before the task sequence starts, such as by setting a collection variable. Once the task sequence starts, Configuration Manager defines the variable once the task sequence starts. SMSTSMP Use this variable to specify the URL or IP address of the Configuration Manager management point. SMSTSMPListRequestTimeoutEnabled Applies to the following steps:. (input) If the client isn't on the intranet, use this variable to enable repeated MPList requests to refresh the client.
By default, this variable is set to True. When clients are on the internet, set this variable to False to avoid unnecessary delays. SMSTSMPListRequestTimeout Applies to the following steps:. (input) 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. By default, the task sequence waits 60000 milliseconds (60 seconds) before it retries. It retries up to three times.
SMSTSPeerDownload Use this variable to enable the client to use Windows PE peer cache. Setting this variable to true enables this functionality. SMSTSPeerRequestPort A custom network port that Windows PE peer cache uses for the initial broadcast. The default port configured in client settings is 8004. SMSTSPersistContent Use this variable to temporarily persist content in the task sequence cache. This variable is different from, which keeps content in the Configuration Manager client cache after the task sequence is complete.
SMSTSPersistContent uses the task sequence cache, SMSTSPreserveContent uses the Configuration Manager client cache. SMSTSPostAction Specifies a command that's run after the task sequence completes. For example, specify a script that enables write filters on embedded devices after the task sequence deploys an OS to the device. SMSTSPreferredAdvertID Forces the task sequence to run a specific targeted deployment on the destination computer. Set this variable through a prestart command from media or PXE. If this variable is set, the task sequence overrides any required deployments.
SMSTSPreserveContent This variable flags the content in the task sequence to be kept in the Configuration Manager client cache after the deployment. This variable is different from, which only keeps the content for the duration of the task sequence. SMSTSPersistContent uses the task sequence cache, SMSTSPreserveContent uses the Configuration Manager client cache. Set SMSTSPreserveContent to true to enable this functionality. SMSTSRebootDelay Specifies how many seconds to wait before the computer restarts.
If this variable is zero (0), the task sequence manager doesn't display a notification dialog before reboot. Example.
0: don't display a notification. 60: display a notification for one minute SMSTSRebootMessage 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 SMSTSRebootRequested Indicates that a restart is requested after the current task sequence step is completed.
If a restart is required, set this variable to true, and the task sequence manager restarts the computer after this task sequence step. 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.
SMSTSRetryRequested Requests a retry after the current task sequence step is completed. If this task sequence variable is set, also set the variable to true. After the computer is restarted, the task sequence manager reruns the same task sequence step. SMSTSRunCommandLineUserName Applies to the step. (input) Specifies the account by which the command line is run. The value is a string of the form username or domain username. Specify the account password with the variable.
For more information on the task sequence run-as account, see. SMSTSRunCommandLinePassword Applies to the step. (input) Specifies the password for the account specified by the variable. SMSTSSoftwareUpdateScanTimeout Applies to the step. (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. The default value is 1800 seconds (30 minutes).
The variable value is set in seconds. Note Starting in version 1802, the default value is 3600 seconds (60 minutes). SMSTSUDAUsers Specifies the primary users of the destination computer by using the following format:. Separate multiple users by using a comma (,).
For more information, see. Example contoso jqpublic, contoso megb, contoso janedoh SMSTSWaitForSecondReboot Applies to the step. (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. 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. 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. TSDisableProgressUI 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: Hide task sequence progress.
false: Display task sequence progress TSErrorOnWarning Applies to the step. (input) Specify whether the task sequence engine considers a detected warning as an error during this step.
The task sequence sets the variable to Warning when one or more applications, or a required dependency, didn't install because it didn't meet a requirement. When you set this variable to True, and the task sequence sets TSAppInstallStatus to Warning, the outcome is an error. A value of False is the default behavior. WorkingDirectory Applies to the step.
(input) Specifies the starting directory for a command-line action. The specified directory name can't exceed 255 characters. Examples.
C:.%SystemRoot% Deprecated variables The following variables are deprecated:. OSDAllowUnsignedDriver: Isn't used when deploying Windows Vista and later operating systems.
OSDBuildStorageDriverList: Only applies to Windows XP and Windows Server 2003. OSDDiskpartBiosCompatibilityMode: Only needed when deploying Windows XP or Windows Server 2003. OSDInstallEditionIndex: Not needed post-Windows Vista. OSDPreserveDriveLetter: For more information, see OSDPreserveDriveLetter. Important This task sequence variable is deprecated. During an OS deployment, by default, Windows Setup determines the best drive letter to use (typically C:).
Previous behavior: when applying an image, the OSDPreverveDriveLetter variable determines whether the task sequence uses the drive letter captured in the image file (WIM). 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.
For more information, see. See also.
Feedback.