I am rolling out Windows 10 to Windows 7 PCs and want them to get a new computer name based on the old one. So I've created a "Set Task Sequence Variable" step in my Task Sequence just before "Apply Windows Settings " as follows:
Task Sequence Variable: OSDComputername
Value: %_SMSTSMachineName:~0,6%1-%_SMSTSMachineName:~8,5%
to take the first 6 characters, then a '1', then the last 5 characters. This format works in a command shell in the form
set newname =%computername:~0,6%1-%computername:~8,5%
But doesn't seem to work in the Task Sequence. Why?
SCCM 1710 5.00.8577