Find Model Number and Serial Number Of Your Computer Using DOS Commands
Desktops and Laptops purchased from manufactures like DELL, IBM, etc comes with a serial number(or service tag) and a model name. If you ever loose this information, then you can use MS DOS commands to retrieve the information
To retrieve serial number of the computer run the following command
wmic bios get serialnumber
To retrieve model name of the computer run the following command
wmic csproduct get name

December 9th, 2008
Bios serial number command is a brilliant one!
December 9th, 2008
This is very useful. if we forgot serial number of the branded computers this command will be very useful ,because we can only find drivers based on the serial number.
December 25th, 2008
Just a note that this code will only work under the windows command shell. it will not work however under real MSDOS 6.2
January 9th, 2009
Awesome. I’m a computer help desk tech. Getting the model and serial number can be the most tedious part of the job. I’ll share this with the other techs. Thank you!
January 9th, 2009
STUMBLED!
Nice one, I love finding tips like this online.
January 9th, 2009
Thank you very much for Stumbling
January 10th, 2009
This is amazing I bought my gateway laptop and my stickers rubbed off very quickly. Any time I would go to their website for support they wanted the model number or the serial number. The only sticker I have left on it is below the LCD that simply says M-Series. This is the best 2 commands I have used in CLI for years. Thanks I love Stumble!!!
January 17th, 2009
Doesn’t work, just tried it with my IBM R40 and it did return numbers when I used those commands, but neither number corresponded with the serial number or model of the computer.
January 19th, 2009
doesn’t work
January 28th, 2009
Didn’t work for me either. Says “wmic is not recognized as an internal or external command.”
February 5th, 2009
It doesn”t work in my xp.
February 24th, 2009
woow! That simple
February 27th, 2009
Only in XP Professsional or Win2003 according to Microsoft.
March 9th, 2009
awesome need to do an insurance inventory
March 25th, 2009
YOU ARE THE MAAAAANN!!!! THANKS!!!!
I was looking for my model number for yyyeaaaarss because it was rubbed off…. now I can use my laptop!!! thanks!!!!!!!
March 28th, 2009
Pfft. DOS is a pathatic command line.
April 6th, 2009
worked for model number..but not for serial number it came as 000000000000 for serial no. please help me to solve the problem
August 22nd, 2009
thank’s your a life saver
August 29th, 2009
But the a pc klon cannot display the serial number
September 3rd, 2009
This is wonderful! It worked for me. All I had to do was go to Start > Run and then type cmd and click Open. After doing this then the information they provided worked.
wmic bios get serialnumber
wmic csproduct get name
September 30th, 2009
Great the command works on the 2003 server also.Many thanks for this tool.
October 7th, 2009
Thanks a lot, unfortunatly it doesn’t work on Windows nt system.
Do you know any other tools to get it?
October 21st, 2009
the S/N seems to work but the window that displays the number flashes for less than half a second then disappears, what does that mean?
November 6th, 2009
i want to dos command for get prosessor serial number or foxpro 2.6 dos command for get prosessor serial number
November 9th, 2009
VBScript. That’s the best Windows users can do? I don’t even need to write a script to figure out these things on Linux. Just need to talk to HAL, which is simple and easy.
Never blindly use VBScripts because Windows’ lack of a security model allows even scripts to wreak havok on your system. Access control lists on Windows are virtually nonexistant.
This VBScript might be safe, but its already plunging idiot Windows users into just blindly copying and executing VBScripts just because their authors claim they’re useful. It’s called social engineering.
No wonder Windows machines get infected so damn much. Idiots with no sense whatsoever.
November 10th, 2009
Anonymous,
the vb script is deleted from the comments. The comment with the VB script was automatically approved by our system. We just had a look at that script and removed as we are not sure the implications of using the script.
November 10th, 2009
ey guys, you are crazy, you are just a little bit mad, that script was just to help people that need Hardware S.N., I’m not an hacker attacker.
[moderated - few sentences are deleted]
November 10th, 2009
Angelo,
As I don’t know anything about VB Script, I removed one of your comments. Please don’t be offended. We never considered you as a hacker or attacker.
I generally remove the content that I don’t understand.
November 10th, 2009
I’m sure your script is meant to be safe and secure. The problem is that VBScript is terribly insecure. A great deal of viruses, and I mean a great deal, written for Windows are simple VBScripts aimed at Windows users under the guise of someone being helpful.
You might be giving them something safe, but without knowledge or annotation of the code, what’s to stop the next guy with VBScript coming along from giving them something truly harmful?
Now any other language, whether scripting or programming, or even simple commands, can be harmful.
It’s the source of where you get the code/script/program/command you need to consider. Unfortunately, I wouldn’t really trust anything given in a blog unless I actually knew specific what it does.
IE, I’d probably be fine running a pacman command that installs a lib, but if some joker attempts to trick me me into running a fork bomb, I’ll know the difference.
But, the source is important. If this were a foum instead of a blog, or a known safe website, then all the power to you. Easier to control what goes on in those environments.
But too often have people gone into blogs or IRC channels and say things like:
“Having trouble getting X to start? Try this command: su -c ‘rm -rf /’
Translated, that command means “With the privileges of root, delete everything recursively starting from the root directory on up.” That will also include all writeable media you’ve got connected to your computer and mounted. IE, it’ll wipe your hard disk AND your thumb drive if your not careful. A worse command would be su -c ‘dd if=/dev/zero of=/dev/sda’. With the privileges of root, directly set every byte in the first hard disk to 0.
My friend, not even professional data recovery people can rescue your files if that command executes to completion.
And no matter how secure your system is, the power of social engineering will overcome it if the user is not well-informed and the cracker is sneaky enough to pull it off.
Yes, your script was safe. But I’d rather not see more people falling for malicious scripts in the future because of a trustworthy on on a random blog that doesn’t even explain what each line does.
November 11th, 2009
You seem a little exagerate, do you think that we are all here to waste time with fake helpful script?
Besides, in any respectable blog/forum, someone test and approve the posts, my script is really able to help people in a box with hardware machine.
It has really driven me crazy, it could be helpful for all Windows users and It’s used in very huge environment.
Anyway no problem, I’ll put it in a real blog where users can take advantage of it.
November 15th, 2009
Angelo get out your high horse and get tuned into the times we live in. You intentions were sincere, but you have to realize that there are people out there who can take advantage of such forums ‘trying to help’ and mess up peoples computers. A lot of people searching for info are not always too technical nor from a development background. So they may trust and run scripts thinking of-course its from a secure source. But not everyones intentions are good as yours hence it was good for it to be removed. If anything else, paste the code in the forum and let people see and decipher.
Gopinath thanks for the two commands,on my Sony Vaio the info was hardly visible so a great command – thanks.
November 18th, 2009
Its work fine and will very helpul to use as key for a particular softwares .
Thanks
November 20th, 2009
It Is Not working..
January 8th, 2010
this was really kool thnx
February 16th, 2010
Hey thanks for the tips, only thing is this dosn’t show a ‘serial number’ for a computer which is not built by a big company. I deal with computers on a day to day basis (occationally stumbeling on a custome built pc), and usually have no proof of actually being there. I have been looking for a universal way to take a serial number from a windows computer that is unique and cannot be changed without removing parts from the computer. Is this something that exists or not? My issue is when I’m helping a customer with a computer, they can easily turn round and say ‘i aint paying’ and I would like to have the piece of mind that I can proove I have been in contact with the computer should I need to take any kind of court action. When I used the other command (csproduct…) I did get a number, but is this a universal number, or is it only universal to the network?
February 19th, 2010
@William – I recommend you boot up a Linux LiveCD made from a desktop distribution, such as Ubuntu. Such a LiveCD has HAL installed, and HAL has a command that lists every last detail it can rip from your hardware, including details on your mobo, chassis, kernel, CPU, memory, whatever.
Keep in mind that homebuilt computers are not likely to have serial numbers because they are not part of a product line.
March 8th, 2010
Hello i have a warrenty for my laptop still outstanding but the serial number has rubbed off and without it can’t get cover (what a stupid way to print it on to a copmuter) Anyway that command comes up but when i click on it it’s just a black box that pops up for half a second then goes….don’t understand why anyone know what i have to do?
March 16th, 2010
Fantastic! thanks, do you per any chanceknow how to do the same with a Unix-shell command in Linux (Ubuntu)?
March 25th, 2010
“Fantastic! thanks, do you per any chanceknow how to do the same with a Unix-shell command in Linux (Ubuntu)?”
hal-device | grep system.hardware.serial
March 26th, 2010
Thanks very much!
I confirm that it works! (on my Lenovo R61)
Great!
March 26th, 2010
Thank You Very Much…. But is it any possible to see in remote system.
March 27th, 2010
“Thank You Very Much…. But is it any possible to see in remote system.”
The Linux shell command will work on a remote system so long as the command is actually given on the remote system (IE, make sure its on a tunneled shell or on the remote desktop you’re connected to.)
April 29th, 2010
Does anyone know how to retrieve Product Numbers??
Serials/model numbers are quite easy but I have been unable to view p/n from HP machines.
Any help would be great.
Cheers,
Juke
May 7th, 2010
dis cmd is working
thank u
June 14th, 2010
the serial number command does not work. I have a gateway mt6451 model with vista sp2. does anyone know any other way to get the serial number? i don’t have the stickers on the computer and gateway will not help me with my problem w/o the serial number. i tried looking through the control panel> computer> system properties but it’s not there either.
July 6th, 2010
Thanks a lot man. This was very helpful for me. I accessed a server from RDC and used these commands to get the model name & serial number for remote support. This saved losing a client of mine.
July 8th, 2010
really it’s very nice.
July 20th, 2010
Does anyone know how you can look up a brand of a computer part? I have a firewire card and I need to know which drivers to download. I have the serial number.
August 4th, 2010
Thank you so much for posting this!
August 10th, 2010
great work thx
August 10th, 2010
Some years ago I used to use a package ctbios which I found on wimsbios.com. Not sure if the site is still up but can’t hurt to look.
August 19th, 2010
How could I pass the results of the serial number to a batch file?…by the way, works great!
August 21st, 2010
i cant find any thing , plx help anyone to find model number of my system
August 24th, 2010
Great help! Thanks a lot!