How to find computer serial number in Windows

How to find computer serial number in Windows

Tags :

Category : IT Support

Hits: 269

Please use one of the methods below to retrieve the computer serial number:

1. Using the buid in “wmic” command: “wmic bios get serialnumber

Tip: You can use the command “wmic csproduct get name” to retrieve the local computer model.

2. Using a vbs script:

On Error Resume Next
Dim strComputer
strComputer = InputBox(“Enter the name of the computer:”)
Set objWMIService = GetObject(“winmgmts:” & “{impersonationLevel=impersonate}!\\” & strComputer & “\root\cimv2”)
Set colSMBIOS = objWMIService.ExecQuery (“Select * from Win32_SystemEnclosure”)
For Each objSMBIOS in colSMBIOS
MsgBox strComputer & “: ” & objSMBIOS.SerialNumber
Next