Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Serial Number

Status
Not open for further replies.

UkMister

IS-IT--Management
Mar 24, 2003
95
GB
Is there any way I can retrieve the serial number from my windows 2000 server without having to reboot?

I have been trying to find a way through the command line but haven't been very successful.

Thankyou
 
do you mean the serial number of the box itself?

"Work to live, don't live to work"

"The problem with troubleshooting is that sometimes it shoots back"
 
To get the serial number of a computer without restarting you can copy this code into a text file and save it as a .vbs (vb script file)

Set SNSet = GetObject("winmgmts:").InstancesOf ("Win32_BIOS")

for each SN in SNSet
MsgBox "The serial number for this PC is: " & SN.SerialNumber
Next

This should work every time.
 
Chris77504,

Thanks for the code, I've been looking at a way of finding this out.

I did as you suggested, but the returned message box contained your comment and an 'OK' box, but no serial number?!? [sad]

Any ideas?

Thanks,

Barry.
 
Set SNSet = GetObject("winmgmts:").InstancesOf ("Win32_BaseBoard")

for each SN in SNSet
MsgBox "The serial number for this PC is: " & SN.SerialNumber
Next
 
Penauroth,

Thanks also for your caode, but it returned the same box with just an OK button.

I'm copying the script and placing it into notepad and saving as a .vbs, so I don't think I'm doing anything wrong.

Thanks for trying anyway. :)



Barry

ICT Network Administrator
IT Services Manager
 
If the PC is clone or the serial number is not captured in the BIOS then it will not work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top