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 TouchToneTommy 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.

secondreckoned

Technical User
Jan 20, 2004
35
CA
Is there somewhere to find the serial number of a server through the operating system?
 
you can use WMI to do this...
put this in a txtfile and rename it to something.vbs
Code:
On Error Resume Next
Dim strComputer
Dim objWMIService
Dim propValue
Dim colItems

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
For Each objItem in colItems
	WScript.Echo "Caption: " & objItem.Caption
	WScript.Echo "Description: " & objItem.Description
	WScript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
	WScript.Echo "Name: " & objItem.Name
	WScript.Echo "SKUNumber: " & objItem.SKUNumber
	WScript.Echo "UUID: " & objItem.UUID
	WScript.Echo "Vendor: " & objItem.Vendor
	WScript.Echo "Version: " & objItem.Version
Next

--------------------------------------
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
 
Thanks, I was able to get the info I needed pretty neat script!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top