The Best Way To Uniquely Identify A Windows Machine

5

Lately I ran into an issue, trying to identify the uniqueness of machines across platforms. Suffice to say, it’s a lot complicate than what I initially thought.

The traditional method of leverage MAC address as the computer’s unique identifier is not going to work anymore. Why? Because each computer can easily have multiple MAC address from multiple network adapter. For example, almost all laptops comes with one Ethernet, one Wi-Fi network adapters and one Bluetooth. The MAC address quickly changes every time when your computer connects from a wired network to a wireless network. Moreover, the MAC address even changes when you are on or off a VPN connection. Not to mention when it’s running on a virtual machines. With that the days of using MAC address as a unique identifier of a computer is gone.

Now what?

Use UUID as the Identifier When You Can

We covered in the past that you can use wmic command to find all the system info from your machine. And we can use the same too here.

command line get biso info thumb - The Best Way To Uniquely Identify A Windows Machine

wmic csproduct get UUID

That UUID is the best way to ID a machine, it exists in Windows, Mac and many other platforms. It is a 32 characters in length, universally unique identifier. You can run the above wmic command to get it.

But wait, that’s not always the case. Some of motherboard vendors might not include this UUID in their motherboard, which is quite common on those non-OEM machines. In that case, when you use wmic trying to retrieve it you will get all FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF as the ID back.

The Alternative

In Windows, there are a couple of alternatives that you can use if UUID idea failed.

The first one is to use your Windows product ID. This is the ID you can retrieve easily from  Control Panel > System and Security > System

But that doesn’t always guarantee the uniqueness of the machine. For example, on those  Windows volume activated or none genuine Windows machines, the Product ID will always be the same. Also keep in mind that if you re-install Windows, this ID might change as well.

The second option is to use the hard drive’s serial number as the unique identifier. That’s almost the better approach if UUID fails, meaning that you can rely on the HDD’s serial number.

wmic DISKDRIVE get SerialNumber

The above command will do the trick. It even returns all of the numbers if you have multiple hard drives physically connected to your machine.

Conclusion

If you want to ID a machine, the old way of using Mac address is not reliable anymore. There are better ways around. We only listed two options here and if you know any others, feel free to share them in the comment below.

Update (July 17, 2015)

There is actually another way to uniquely identity each Windows PC. Open up Registry and navigate to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography

Find the key called “MachineGuid” this key is generated uniquely during the installation of Windows and it won’t change regardless of any hardware swap (apart from replacing the boot-able hard drive where the OS are installed on). That means if you want to keep tracking installation per OS this is another alternative. It won’t change unless you do a fresh reinstall of Windows.MachineGuid

SHARE

5 COMMENTS

  1. if different PCs use same OS’ installed HDD image instead of seperate installation, using Cryptography will fail.
    VMWare instances created from same image may also fail. Overall, using the disk-serial-number seems most robust among all these.

    • agreed, however, if using a combination of those attributes and serialize properly will achieve a better outcome of identifying uniqueness. if given the same hardware and clone the entire image in the same VM stack, it would be difficult to tell the two apart.

  2. Hi,

    I have a UUID in that format and would like to find out what it is for. I’ve searched the registry for the UUID but it doesn’t find it.

    Is there any other way to search for the string in anything other than the registry? Or is this the only place this UUID in that format is stored.

LEAVE A REPLY

Please enter your comment!
Please enter your name here