cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
stevenoel
Engaged Sweeper
Hi,

I'm using the following query to get USB connected printers:

Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
Coalesce(tsysOS.Image, tsysAssetTypes.AssetTypeIcon10) As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Lasttried,
tblUSBDevices.Name As USBDeviceName,
tblUSBDevices.Manufacturer As USBDeviceManufacturer,
tblUSBDevices.LastChanged,
tblUSBDevices.Win32_USBDeviceid,
tblUSBDevices.DeviceID
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblUSBDevices On tblAssets.AssetID = tblUSBDevices.AssetID
Left Join tsysOS On tblAssets.OScode = tsysOS.OScode
Where tblState.Statename = 'Active'
Order By tblAssets.Domain,
tblAssets.AssetName,
USBDeviceName



On first glance this seems to work great, but I'm finding a discrepancy in that I have some specific machines I know have a specific device connected but they don't show up in the report.

The only things I've been able to correlate so far is that for the machines that do show up properly the device is on usb001 and the ones that don't show up in the report are on usb002 or usb003.

I can see this when I pull up the PC details for the machines in question and click on Config, Devices, Printer.

Has anyone seen this beahvior? Is there something I missed with regards to looping through *all* devices?

Thanks!
Steve
0 REPLIES 0