6

As you know you can get a list of drives connected via SATA using wmic:

wmic diskdrive list

This however doesn't seem to work with M.2 SSDs. Is there any equivalent for M.2 SSDs that is not vendor specific?

karel
  • 13,390
  • 26
  • 45
  • 52
marekp
  • 169
  • 2
  • 2
  • 9
  • have you tried `wmic diskdrive get name, serialnumber, mode` I do not have an M2 but need to snatch one up would love to know this too if it works. – NetworkKingPin May 06 '16 at 09:55
  • @NetworkKingPin - nope, not working – marekp May 06 '16 at 09:59
  • Try this and save it as .bat `@echo off for /F "tokens=* skip=1" %%n in ('WMIC path Win32_PnPEntity get Name ^| findstr "."') do set PCIExpress_NAME=%%n echo %PCI Express% pause` This should display some information on about your SSD im trying to get closer to finding out the possible Serial as I cant find any documentation on it. It does seem as the WMIC does not support PCIE devices. – NetworkKingPin May 06 '16 at 10:29
  • @NetworkKingPin this didn't work either – marekp May 06 '16 at 12:14
  • 1
    I've done some research and it looks like no one has achieved this yet I even talked to a colleague he said it was very interesting. So I hope someone has some more knowelge about this because it seems this could get some attention as more people switch to pcie SSD's – NetworkKingPin May 06 '16 at 20:00

1 Answers1

5

In Windows 10 (maybe works in 8 already but definitely not in windows 7) you can use

wmic /namespace:\\root\microsoft\windows\storage path msft_disk get Model,BusType

BusType of 17 means NVMe, 11 Sata, 7 USB (full list can be found here)

Win 10 based WinPE does also support this but needs additional packages (The classes are part of Windows PowerShell/WinPE-StorageWMI which has some additional dependencies).

Syberdoor
  • 1,772
  • 13
  • 11