List of Plug and Play Devices

Please use the below script to get list of all plug and play devices from the target machine

import os

lOut = os.popen('wmic logicaldisk where drivetype=2 get deviceid, volumename, description').readlines()

for i in lOut:

    print i