Skip to content

Instantly share code, notes, and snippets.

@ljmccarthy
Created March 25, 2019 14:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ljmccarthy/865b0e4683dc005db01281e49c9424b1 to your computer and use it in GitHub Desktop.
List removeable drives using WMI query
Get-WmiObject -query "SELECT * FROM Win32_DiskDrive WHERE MediaType = 'Removable Media'" | Select-Object *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment