Hi,
Thank you for posting in Microsoft Q&A forum.
You can try to use a task sequence step to run a PowerShell script to assigns the site code/location via a custom variable. Similar threads for your reference:
Automate Computer Name during OSD in ConfigMgr 2012 with PowerShell
Thanks for your time. Have a nice day!
Best regards,
Simon
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.