I am following this answer, which contains
Register-WmiEvent -Class win32_VolumeChangeEvent -SourceIdentifier volumeChange
$newEvent = Wait-Event -SourceIdentifier volumeChange
This works when I insert or remove a USB flash drive. (I'm thinking it's because of
VolumeChange) I would like to detect insertion or removal of any USB device though, not only drives. Is this possible? Thank you!