The SCCM 1906 task sequence automatically names the computer according to SN
In order to facilitate asset management, decided to use custom fields + SN naming computer, in order to solve this problem, read a lot of domestic and foreign reference documents, or did not solve, I used SCCM1906, most of the reference documents are SCCM 2012, have no choice but to go to the official to find.
The relevant parameters are found in the official document task variable:
_ SMSTSMachineName stores and specifies the computer name; this is the default computer name variable
_ SMSTSSerialNumber specifies the computer serial number; this is the variable that gets SN
OSDComputerName specifies the name of the target computer; this is a variable that specifies the name of the computer
What I understand is that the default computer name parameter should be:
OSDComputerName=%_SMSTSMachineName%
All we have to do is modify the OSDComputerName variable:
OSDComputerName=%_SMSTSSerialNumber%
When the deployment is complete, the computer name becomes SN. Of course, some companies like to add specific strings and can change the value of OSDComputerName to XX-%_SMSTSSerialNumber%, as long as it does not exceed 15 digits.
If the above operation is not successful, you can add a sequence of dynamic variables before the partition, and the parameters are the same.