this post was submitted on 23 Jan 2024
193 points (95.7% liked)

Programmer Humor

32000 readers
741 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 

Found while doing forensics on some rediscovered loose flash drives.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 11 points 7 months ago* (last edited 7 months ago)

Get-Disk would have sufficed here, no real need to use WMI here. That said, you would still need to filter USB device and select properties you want to retrieve.

And unrelated, but if WMI class needs to be queried, Get-CimInstance is the preferred method instead of Get-WmiObject for quite some time.