Skip to content

Instantly share code, notes, and snippets.

@ihipop
Last active February 8, 2022 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ihipop/3beea98b6582322f159e27274b4fef14 to your computer and use it in GitHub Desktop.
Save ihipop/3beea98b6582322f159e27274b4fef14 to your computer and use it in GitHub Desktop.
给VirtualBox的虚拟机设置一个BIOS/主板序列号

设置

VBoxManage setextradata "Win 11" "VBoxInternal/Devices/efi/0/Config/DmiBoardSerial" "string:SN001" 
VBoxManage setextradata "Win 11" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "string:SN001"

如果是传统BIOS引导,把efi 换成 pcbios 即可

VBoxManage setextradata "Win 11" "VBoxInternal/Devices/pcbios/0/Config/DmiBoardSerial" "string:SN001" 
VBoxManage setextradata "Win 11" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemSerial" "string:SN001"

Windows读取的是DmiSystemSerial

校验

WMIC

wmic csproduct get name
wmic baseboard get serialnumber
wmic bios get serialnumber

PowerShell

get-wmiobject -query "Select * FROM Win32_BIOS" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment