This SQL query will return all of the machines that have USB Disk Drives along with the last logged on user name.
SQL Query:
Select
CS.Name0,
CS.UserName0,
HD.DeviceID0,
HD.InterfaceType0
From v_Gs_Computer_System CS
Join v_Gs_Disk HD on CS.ResourceID = HD.ResourceID
Where HD.InterfaceType0 = 'USB'
Order By HD.DeviceID0
If you have no need for the last logged on user name you can use this slightly simplified version:
SystemName0,
DeviceID0,
InterfaceType0
From v_Gs_Disk HD
Where InterfaceType0 = 'USB'
Order By DeviceID0
No Comments