Skip to content

Instantly share code, notes, and snippets.

@nshopik
Last active February 27, 2025 15:48
Show Gist options
  • Save nshopik/4ab99e27ca9e61f7b8a0 to your computer and use it in GitHub Desktop.
Save nshopik/4ab99e27ca9e61f7b8a0 to your computer and use it in GitHub Desktop.
wmic get motherboard model
wmic baseboard get product /value
#powershell
$baseboard=Get-WmiObject Win32_baseboard | Select-Object Product | foreach { $_.Product}
$name=[System.Text.RegularExpressions.Regex]::Replace($baseboard,"[^0-9a-zA-Z-]","-");
RENAME-COMPUTER -computername (hostname) -newname $name; RESTART-COMPUTER -force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment