Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Last active May 20, 2023 07:42
Show Gist options
  • Save guitarrapc/6750dbedf312bc8c63788d3da3e0df85 to your computer and use it in GitHub Desktop.
Save guitarrapc/6750dbedf312bc8c63788d3da3e0df85 to your computer and use it in GitHub Desktop.
Detect is Windows Storage is NVMe, SSD or USB
# Run on Windwos PowerShell or pwsh. Don't needd Administrator Priviledge
# BusType 17 = NVMe, 11 = SATA, 7 = USB. see https://docs.microsoft.com/en-us/previous-versions/windows/desktop/stormgmt/msft-disk
Get-CimInstance -namespace Root\Microsoft\Windows\Storage -class msft_physicaldisk | select FriendlyName, BusType
wmic /namespace:\\root\microsoft\windows\storage path msft_disk get FriendlyName,BusType
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment