Question: I need to determine if Windows thinks that my SATA hard drives are “removable” or not. ?The problem is, its on a Hyper-V system, and I don’t have access to the Disk Management GUI application. ?diskpart does not have this information, and I’m not sure where to turn now. ?How can I determine this via command line tools, or through PowerShell?

Answer: This is very easy in PowerShell using the .NET Framework, I’ve just tested it on an external drive 🙂

PS C:>$drive = New-Object system.io.driveinfo(“F:”)PS C:>$drive.DriveTypeRemovable

You can also use WMI:

C:>wmicwmic:rootcli>logicaldisk get caption,drivetypeCaption ?DriveTypeC: ?3D: ?5E: ?5F: ?2

Where drive types are:

0 – Unknown 1 – No Root Directory 2 – Removable Disk 3 – Local Disk 4 – Network Drive 5 – Compact Disk 6 – RAM Disk

💠

🔵 Best-selling hard drives, USB flash drives & SSDs everyone's buying.

Fast, reliable, and on sale now. Thousands pick these weekly — don't miss Amazon's lowest storage prices.

Top 10 Bestsellers
🏆 4.7★+ Reviews
📦 Prime Shipping
👉 See today's best-selling Data storage on Amazon.com HDD · USB Flash Drives · SSD · External Drives
🛒
✅ Updated hourly — Amazon real-time ranking 🔥 Limited stock deals 🔗 Affiliate
⭐ Click to see complete best-selling list ⭐