USB Monitor - using WMI Event notification Some one in the Support Section asked if it was possible to have a notification if a USB drive was Connected / Disconnected. Well here is an example using the WMI Event notification : $strComputer = "."
$objWMIService = ObjGet("winmgmts:" & $strComputer & "rootcimv2")
$colEvents = $objWMIService.ExecNotificationQuery _
("Select * From __InstanceOperationEvent Within 5 Where " _
& "TargetInstance isa 'Win32_LogicalDisk'")
While 1
$objEv