How can I get the real NVMe serial number using PowerShell?

0
34
Asked By FrustratedCoder92 On

I'm really frustrated right now! I'm trying to get the actual NVMe serial number using this PowerShell command: `(Get-PhysicalDisk).AdapterSerialNumber`. The problem is that while SerialNumber gives me a long string like `E823_8FA6_BF53_0001_001B_448B_4BAB_1EF4`, it's not accurate. On some of my Dell machines, however, AdapterSerialNumber is completely blank, which doesn't help. I know CrystalDiskInfo pulls the correct serial number without any issues, but I can't install that on every machine. We have a mix of SSDs, so I can't rely on vendor tools either. I noticed that Intel Optane Management tool displays the right serial number under Controller Serial Number, but I can't seem to download the necessary Intel MAS CLI tool from their website. I've spent about 6 hours scouring the internet for a solution, but I haven't found much, except for one thread on PowerShell that went unanswered. I even tried switching my drives from RAID to AHCI mode, but that didn't help either. What can I do?

6 Answers

Answered By DiskDetective87 On

I've noticed that on my setup, the FruID often matches the AdapterSerialNumber and fills in where that’s blank, so you might want to check that. It's worked for me on a few machines with multiple NVMe and SATA SSDs.

TechSavvyChris -

Same here! It worked fine on my HP and MSI NVMe setups.

Answered By SmartScriptor99 On

You should check out this script called [get-subnqn.ps1](https://github.com/ken-yossy/nvmetool-win-powershell/blob/main/scripts/get-subnqn.ps1). It gives you the same serial number as CrystalDiskInfo for the NVMe drives I tested. You might need to tweak it a bit for your situation though.

Answered By ITGuySam On

I'd recommend just outputting everything from your command to see if it reveals anything more. You might find the right value hidden in there somewhere.

Answered By PowerShellGuru43 On

Have you tried using CIM instead? It might provide the data you're looking for without the confusion of the adapter numbers.

Answered By TechieTim On

I can confirm that `(Get-PhysicalDisk).AdapterSerialNumber` works on my Precision 3581, so I'd check what models you're working with. Maybe that's where the issue lies?

Answered By DriveNerd42 On

Remember that M.2 drives come with their own controllers, which could be why you're not seeing consistent numbers across your devices.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.