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

78 thoughts on “Find Model Number and Serial Number Of Your Computer Using DOS Commands”

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

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

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

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


  5. “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.)

  6. “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

  7. Fantastic! thanks, do you per any chanceknow how to do the same with a Unix-shell command in Linux (Ubuntu)?

  8. 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?

  9. @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.

  10. 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?

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

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

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

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

  15. 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]

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

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

  18. 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?

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

  20. Pingback: Como encontrar el modelo y numero de serie de mi PC | Kabytes

  21. worked for model number..but not for serial number it came as 000000000000 for serial no. please help me to solve the problem


    I was looking for my model number for yyyeaaaarss because it was rubbed off…. now I can use my laptop!!! thanks!!!!!!!

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

  24. 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!!!

  25. 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!

  26. Just a note that this code will only work under the windows command shell. it will not work however under real MSDOS 6.2

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

Leave a Comment

Your email address will not be published.