I'm building a Windows 11 deployment process and tried using both Windows Configuration Designer and an Autounattend.xml generator to set each computer's hostname to its BIOS serial number. Both tools present %SERIAL% as the convenient, apparently supported variable, but it doesn't seem to resolve during installation. Searching for troubleshooting information gives conflicting answers: some documentation claims the variable should work, while other discussions say Windows Setup cannot query the BIOS serial number at that stage. Which behavior is actually expected, and what is the most reliable way to set the hostname? I may need to inject a PowerShell script into the deployment, since a simple unattend setting probably won't be enough.
3 Answers
The generator can expose a %SERIAL% placeholder without Windows Setup actually supporting it in every pass or deployment scenario. Ultimately, the tool only writes the unattend file; it can’t make Setup retrieve hardware information that the relevant configuration pass doesn’t provide. Check the generated XML and the Setup logs to confirm whether the placeholder is being left unchanged. If it is, a post-install PowerShell step that reads the BIOS serial number through CIM or WMI and then renames the computer is usually the dependable approach.
If you’re handling a variety of machines, consider a deployment tool that supports choosing a naming prefix or device name during the imaging process, then let a post-install script finish the configuration. You can also have the script install your management agent and perform the rename after Windows has fully booted. That avoids relying on an unattend variable whose behavior may differ between editions, Setup passes, and hardware.
One alternative is to avoid querying the BIOS during Windows Setup altogether. Some deployment workflows store the intended computer name in the device’s BIOS asset-tag field and use that value during OOBE or in a later provisioning script. That can work well if you control the hardware, but it depends on the manufacturer and whether the firmware exposes the asset tag consistently.

That makes sense. I was treating the generator’s field as proof that Setup supported the variable, rather than just assuming it was expanding it somewhere.