Last active
March 25, 2019 10:53
-
-
Save ljmccarthy/3b4441ece4c3a9189b5343591a0cbd9f to your computer and use it in GitHub Desktop.
List removable writable drives on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-WmiObject -Class Win32_DiskDrive | | |
Where-Object {$_.Capabilities -contains 3 -and $_.MediaType -eq "Removable Media"} | | |
Select-Object Caption, Size, SerialNumber, InterfaceType, DeviceID, Status |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment