Please refer the script to, Get List of Plug and Play Devices.
It will shows the active connections which are connected to your system.
Youcan run the script procedure as either "system user" or "loggedin user" according to the requirement.
---
Comments