Video Screencast Help

Hardware Inventory Scan - USB Storage Devices

Created: 24 Jul 2011 • Updated: 25 Jul 2011 | 4 comments
This issue has been solved. See solution.

Hey guys,

Will the NS Hardware Scan report attached USB storage devices only if they are attached when the scan runs?

Or will it report a history of all the USB storage devices that have been attached to the computer?

I'm looking at the vHWUSBDevice view - NS7.0 SP4



Comments 4 CommentsJump to latest comment

Rhys Paterson's picture

... it appears that it only records devices attached at the time of the scan, whether I run a full or delta scan.


Does anyone have any suggestions as how to obtain a historical list of USB devices that have been attached to a machine? I know we tested a product for something else and it was able to report all the devices that had ever been attached to the machine (so I guess that information is stored somewhere).

Custom inventory maybe?



edit: it appears as if this history is all stored here: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\

Might try get this with custom inventory.

JP330ci's picture

Definitely should work with a custom inventory scan.. nice find, I'm going to use this one myself! 


jharings's picture

in the Symantec console, it just requires more database space. I would find the specific tables you want to track, and go from there. But your find and approach are good, and sound like more fun.

Jim Harings
HP Enterprise Services
1st Rule of Connect Club: Mark the post that helped you the most as a 'solution'. 2nd Rule of Connect Club:You must talk about Connect club.

Rhys Paterson's picture

It could probably be a bit neater/smarter, but it does work.

 To use this, create a new custom data class with three rows.

One for Class, Friendly Name and the Hardware ID. I just made them all 255 sized strings that are not keys and don't require data.

Get the GUID of the data class and replace my one in the attached script.

Then just run it! 

(p.s, thanks for that info jharings)

I query the data like such:

 SELECT  usb.[Class],
         vc.[Name] AS 'Workstation',
         vc.[User] AS 'Primary User'

-- Change this table with the one you created in the custom data class
FROM Inv_Historical_USB_Storage_Devices usb

JOIN vComputer vc

ON usb.[_ResourceGuid] = vc.[Guid]

WHERE usb.[HardwareID] ! = ''

ORDER BY usb.[FriendlyName]

edit: make sure your custom data class has the 'allow multiple rows from a single computer resource' checkbox ticked

AttachmentSize 1.13 KB