0

I want to launch a Powershell script when a usb device is unplugged. To accomplish that I would like to use a scheduled task but I don't know what event trigger I should use.

I already know that to detect when a USB device is plugged in, you have to use the following event trigger : (in Event Logs) Application and Service Logs/Microsoft/Windows/DeviceSetupManager/Admin but I am looking for the event trigger to use to detect when the device is unplugged.

M.Brbr
  • 129
  • 2
  • 14
  • There should be another event for when a device is unplugged. – LPChip Jul 26 '18 at 09:47
  • Yes, I am looking for the name of this event or at least a method to find other than trying every events... I found how to detect the plug in of a usb device on the internet but so far I haven't found how to detect that this device is unplugged on forums – M.Brbr Jul 26 '18 at 09:54
  • 1
    Navigate to that log, unplug your device and see whatever message pops up in that log? – Seth Jul 26 '18 at 10:04

0 Answers0