How to Specify the Computer Name during a ConfigMgr OS Deployment
Ever want to specify a specific computer name during an OS deployment without having to do a computer association to mac address “import computer information”. Simply right click on the collection you wish to advertise to (in my case it is “all unknown computers”) and click on “Modify Collection Settings”. Click on the variables tab and choose to create a new variable.

Name the variable OSDComputerName and keep the values blank like below. You will be able to specify the value when you initiate your next OSD task sequence to the collection. Also Uncheck “Do not display this value in the ConfigMgr console”. This will allow the value to be displayed in ConfigMgr.

When you boot to the advertise task sequences select the task sequence you want to deploy and click next. You will then see the OSDComputerName field. Double click on this and you can specify the computer name you wish to use. Click ok and then click next to kick off your task sequence. This variable will be held and put into place during your deployment.
Note: Not naming the task sequence exactly OSDComputerName will cause this to fail.

Excellent! This has been causing me grief for ages and caused me to end of headaches with SCCM when I had to change the PC name later on!
This is a good solution; thanks!
very useful thx
Awesome, cheers