Solved

server's serial number

Posted on 2007-04-03
18
4,077 Views
Last Modified: 2009-03-11
I need to know what my server's serial number is.  Is there a command prompt that can do that for me?
I am running windows 2003 pro server.
0
Comment
Question by:systems_ax
  • 6
  • 4
  • 3
  • +3
18 Comments
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18844502
There is no such thing as Windows 2003 Pro Server.  I assume you mean Windows 2003 Server.  Try SIW - it lists license keys.  http://www.gtopala.com/
0
 
LVL 70

Expert Comment

by:KCTS
ID: 18844514
Do you mean product key? Use Regedit: It should be at
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18844550
yes, Windows 2003 small business Server.  Is there a dos command that can be issued to find what the serial number of the machine is?
thank you very much
0
 
LVL 8

Accepted Solution

by:
RichardSlater earned 300 total points
ID: 18844611
I can't test it right now because I don't have access to a Windows 2003 box, but the following should work:

wmic systemenclosure get serialnumber
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18844615
No there is no command line, built in program to do that.  You will need to use a third party tool, I recommend SIW (link above).
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 18844640
Not for the Windows Serial number - that gets you the hardware serial number - if the bios supports it.
(Ran the command on both an XP box and a 2003 box and neither reported any data).

Further, correct me if I'm wrong, but your looking for the PRODUCT KEY to allow re-installation if you need to, right?
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18844727
leew,
I am looking for the server's serial number so that I can create a registry key manually.  What happens is that when I install this particular software on this server, the registry key is not created in the registry, the reason i know that is because the key (i know where it should be) is not there, but everything else such as installation folder with all the files and the service are created.  Everytime i try to start this server (it is a sybase product), it tells me that the registry key does not exist.
I have tried re-installing this software several times and for some reason, the installation path point to the Recycle bin and not the default path as it is coded within the deployment.  

is there any utility that might be blocking the key registration?
thank you very much
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18844740
RichardSlater,
thank you
i tried wmic systemenclosure get serialnumber and all i see is:
"CHASSIS SERIAL NUMBER"
i do not know what this all means
0
 
LVL 8

Expert Comment

by:RichardSlater
ID: 18844860
That is the same message I get on a Windows XP Pro workstation, which I can only assume means that it can not be done with WMI. I will test further tomorrow.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 8

Expert Comment

by:RGRodgers
ID: 18845068
The WMIC command worked for me on XP.  It first said that it was installing the command.  Then, it gave me the serial number.  That command is way too cool.  It can give you a lot of information.
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18845154
RGRodgers,
what exactly did you type?  It gives me "CHASSIS SERIAL NUMBER".
thank you
0
 
LVL 8

Expert Comment

by:RGRodgers
ID: 18845235
I actually copied and pasted the command as provided by RichardSlater

wmic systemenclosure get serialnumber

The response was:
SerialNumber
0034xxxxx9

I added the xxxxxx's....
0
 
LVL 8

Expert Comment

by:RichardSlater
ID: 18845266
WMI is fantastic!

system_ax, accessing the serial number will only work if the manufacturer has entered it into the BIOS this will not work on a custom built server/pc, I have only ever seen it working on IBM and HP servers.
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18845293
RichardSlater,
my server is not custom built and is Samsung.  This is only a development sever and i did not activate windows yet.  Will that matter?
How do I chech if manufacturer has entered it into the BIOS?
thank you very much
0
 
LVL 8

Expert Comment

by:RichardSlater
ID: 18845321
You should be able to find information in the BIOS itself. Reboot and press the key indicated to get into "Setup" usually. Never used Samsung servers, so I can't help you any more I am afraid.
0
 
LVL 4

Assisted Solution

by:mansmanf
mansmanf earned 200 total points
ID: 18849502
Using WMI:

Save the following as VBS file, e.g.

____________________________
Set oArgs = wscript.Arguments

If (oArgs.Count <> 1) Then
    wscript.echo "Usage: alias.vbs Servername"
    wscript.echo "e.g cscript alias.vbs RKAMSEM1"
    wscript.quit (0)
End If

'General values
On Error Resume Next
strComputer =  oArgs(0)
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer &

"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Manufacturer: " & objItem.Manufacturer
    Wscript.Echo "Model: " & objItem.Model
Next

'Serial Number of server
On Error Resume Next
strComputer =  oArgs(0)
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer &

"\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystemProduct",,48)
For Each objItem in colItems
    Wscript.Echo "Version: " & objItem.Version
    Wscript.Echo "IdentifyingNumber: " & objItem.IdentifyingNumber
Next

WScript.Quit(0)
____________________________

OPEN A CMD

Start program: cscript GetSerial.vbs %computername%

you also could connect to other computers if you account has proper rights (admin)
0
 
LVL 1

Author Comment

by:systems_ax
ID: 18850924
mansmanf,
where is the computer name listed?
This script requires it: Start program: cscript GetSerial.vbs %computername%

THANK you very much
0
 
LVL 4

Expert Comment

by:mansmanf
ID: 18851276
The computername is the parameter %1 that is handed to the VBS script

strComputer =  oArgs(0)

You can also directly insert the computername in the script.
(would be a line like strComputer=Mycomputername

the script was build (this is only a small part of the original WMI script) to query a variable list of server (names) about some values..., starting the command line like follows:

e.g.:
for /F "eol=; delims=, " %i in (C:\serverlist.txt) DO cscript //NOLOGO GetSerial.vbs %i >>C:\Result.txt

(use a txt file (C:\serverlist.txt)  with one computername per line, exklude lines with ";" in the beginning

Have a nice day
Frido
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Welcome to my series of short tips on migrations. Whilst based on Microsoft migrations the same principles can be applied to any type of migration. My first tip Migration Tip #1 – Source Server Health can be found here: http://www.experts-exchang…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video discusses moving either the default database or any database to a new volume.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now