Lansweeper report: printers
Contents
Report details
![Lansweeper report containing printer name, IP and MAC addresses, manufacturer and model](lansweeper-report-printers/lansweeper-report-printers.png)
Report contains basic information about printers:
- date of the last successful scan of a printer;
- printer name;
- IP address;
- MAC address;
- printer manufacturer;
- printer model.
T-SQL query
Lansweeper datbase documentation can be accessed from the web console: Reports 🡢 Database Documentation.
Columns with hyperlink_ and hyperlink_name_ prefixes in their names are used to place hyperlinks into cells of a Lansweeper report as described here.
SELECT
,CAST([tblAssets].[LastSeen] AS date) AS [Last Successful Scan Date]
,'https://ls.adatum.local/asset.aspx?AssetID='
+ cast([tblAssets].[AssetID] AS nvarchar(100)) AS [hyperlink_Printer Name]
,[tblAssets].[AssetName] AS [hyperlink_name_Printer Name]
,[tblAssets].[IPAddress] AS [IP Address]
,[tblAssets].[Mac] AS [MAC Address]
,[tblAssetCustom].[Manufacturer] AS [System Manufacturer]
,'https://www.google.com/search?q='
+ [tblAssetCustom].[Model] AS [hyperlink_System Model (Click to Google)]
,[tblAssetCustom].[Model] AS [hyperlink_name_System Model (Click to Google)]
FROM
[lansweeperdb].[dbo].[tblAssets]
INNER JOIN [lansweeperdb].[dbo].[tblAssetCustom] ON [tblAssets].[AssetID] = [tblAssetCustom].[AssetID]
WHERE
[tblAssets].[AssetType] = 16 -- 16 = "Printer"
AND [tblAssetCustom].[State] = 1 -- 1 = "Active"
ORDER BY
[tblAssets].[AssetName]