Subscribe

Get the Network Administrators tool pack

Subscribe to our newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them.

Click Here to get your free tools

Recent Posts

Search

Archives

How to list all USB devices on your network

Post image for How to list all USB devices on your network

by Steve Wiseman on February 22, 2013 · 4 comments

in Network Administrator,Tips,Tools,Utility


.

I got an email from Clair this week:

“Hi Steve, We have been using the free edition of Network Administrator for quite some time. I was wondering if there was a way to get a report of all USB devices on a system?”

This is a good question Clair.

First let me show you how to get this info from a VB Script.

It took me a while to find the right WMI interface to pull this info, but I found it. It takes two steps.

The first part of the script will pull the list of device IDs:

Set sWMI = GetObject(“winmgmts:\\.\root\cimv2”)
Set sDevices = sWMI.ExecQuery(“Select * From Win32_USBControllerDevice”)

For Each sDevice in sDevices
 Rem Get the device ID
 sDeviceID = sDevice.Dependent
 sDeviceID = Replace(sDeviceID, Chr(34), “”)
 sDeviceIDs = Split(sDeviceID, “=”)
 sDeviceID = sDeviceIDs(1)
Next

Notice we had to play with the device ID string to pull out what we want.

Now that we have the device id, we can pull the manufacturer and the description of the device:

Set sUSBDevices = sWMI.ExecQuery(“Select * From Win32_PnPEntity Where DeviceID = ‘” & sDeviceID & “‘”)
For Each sUSBDevice in sUSBDevices
 Wscript.Echo(sUSBDevice.Description + ” [” + sUSBDevice.Manufacturer + “]”)
Next

When you run it, it will give you a full list of USB devices on your system:

USB Device List from a Script

You can get the full script from here:

Devices.Dat

Remember to rename to .vbs once you download it.

Now, back to listing all the USB devices on your network. We have added this script to Network Administrator which makes it easy to get a list:

Network Administrator USB Device Report

When you execute it against a computer, the list shows up in the status window:

USB Device Report Output

You can get a copy of the latest version of Network Administrator from here:

Network Administrator

One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Click Here to get your free tools

Related Articles:

{ 4 comments… read them below or add one }

1 Clair February 22, 2013 at 12:23 pm

Thank you for this steve! I am not even a customer, just a free loader using the 3 computer version.

2 Steve Wiseman February 22, 2013 at 12:23 pm

No worries Clair. I think there are a lot of other people who could use this plugin

3 John Davis February 22, 2013 at 12:24 pm

That is the truth! I bought Network Administrator 6 months ago, and loving the year of free updates. Keep it going guys!

4 Steve Wiseman February 22, 2013 at 12:25 pm

Glad to hear it John. For anyone else that has an older version, just install the new one and it will automatically update your copy.

Leave a Comment

Category Links - Windows Forum - Exchange Forum