I have a laptop that periodically notifies me that some piece of hardware was installed/removed by playing the little ba-dum sound. I have no idea what hardware is changing - I am not adding or removing any devices. Is there a piece of software or maybe a PowerShell script I can run that hooks into WMI or whatever similar event would actually trigger the sound to be played and get more info on what device is appearing or vanishing from my system? I would love to know what is causing this so I can replace/reconfigure/retire this piece of hardware.
Update 1: The hardware is an HP 8760w laptop, with a dock. The issue is definitely more pronounced when docked.
Update 2: I opened the Device Manager and switched the View menu choice to Devices By Connection, and expanded every element of the tree. Through some process of elimination and just watching it, I narrowed it down to the element shown in the picture below. There is a "Generic USB Hub" attached to what appears might be related to the fingerprint reader. As I have no need for the fingerprint reader, or any of the USB Hubs attached to EHCI controller 1C2D - I just disabled it in the device manager for now. I may look and see if I can just disable the fingerprint reader in the BIOS.
Update 3: I want to still leave this open as there is not an answer to "detect hardware changes" through software/script/PowerShell/WMI something. The human parser is only so accurate with finite timing :)