cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lemr
Engaged Sweeper
someone can tell me how can I determine if a computer is a laptop or a desktop Machine (using the tables of lansweeper)? thanks.
1 ACCEPTED SOLUTION
Hemoco
Lansweeper Alumni
The sample report below lists your Windows computers' chassis information. Note that there are several possible chassis values for "desktops" and "laptops", e.g. laptops can be identified as "laptop", "notebook" or "portable".
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
TsysChassisTypes.ChassisName As Chassis
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName

To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.

P.S.: Please only create one thread for each question.

View solution in original post

2 REPLIES 2
RCorbeil
Honored Sweeper II
Another approach is to LEFT JOIN to tblPortableBattery and check whether there's an entry in the table. If there is, it's a portable device (notebook).

Select Top 1000000
tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
TsysChassisTypes.ChassisName As Chassis,
Case
When tblPortableBattery.AssetID Is Not Null
Then 'Notebook'
Else ''
End As Class
From
tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSystemEnclosure On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype = tblSystemEnclosure.ChassisTypes
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Left Join tblPortableBattery On tblAssets.AssetID = tblPortableBattery.AssetID
Where
tblAssetCustom.State = 1
Order By
tblAssets.Domain,
tblAssets.AssetName
Hemoco
Lansweeper Alumni
The sample report below lists your Windows computers' chassis information. Note that there are several possible chassis values for "desktops" and "laptops", e.g. laptops can be identified as "laptop", "notebook" or "portable".
Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblAssets.IPAddress,
tblAssets.Firstseen,
tblAssets.Lastseen,
TsysChassisTypes.ChassisName As Chassis
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tblSystemEnclosure
On tblAssets.AssetID = tblSystemEnclosure.AssetID
Inner Join TsysChassisTypes On TsysChassisTypes.Chassistype =
tblSystemEnclosure.ChassisTypes
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Where tblAssetCustom.State = 1
Order By tblAssets.Domain,
tblAssets.AssetName

To use the report above, do the following:
• Open the report builder under Reports/Create New Report.
• Paste the SQL code we provided at the bottom of the page.
• Left-click somewhere in the upper section of the page so the code applies.
• Give the report a Title and hit the Save & Run button to save it. Export options are listed on the left.

P.S.: Please only create one thread for each question.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now