Skip to content

Instantly share code, notes, and snippets.

@digudc
Forked from guitarrapc/Get-StorageBusType.ps1
Created May 20, 2023 07:42
Show Gist options
  • Save digudc/d36416ac3eee2990303f537997106595 to your computer and use it in GitHub Desktop.
Save digudc/d36416ac3eee2990303f537997106595 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