Notification

Icon
Error

Assets: Assets and location maps they're on (Built-in)

Posted: Tuesday, August 8, 2017 2:43:22 PM(UTC)
Nick.VDB

Nick.VDB

Member Lansweeper Developer Administration Original PosterPosts: 251
0
Like
Added in v.6.0.100

The report below lists assets and any location map they are placed on. Both the asset and location map are given back in the report.

The report will only list assets that meet all of the following criteria:
  • The asset state is set to "active".
  • The asset has been successfully scanned at least once.
  • The asset is placed on a location map.


Code:

Select Top 1000000 tblAssets.AssetName As Asset,
  tblAssets.Domain,
  tsysAssetTypes.AssetTypename As AssetType,
  tblAssets.Username,
  tblAssets.Userdomain,
  tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAssets.IPAddress,
  tsysIPLocations.IPLocation,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  Coalesce(tsysOS.OSname, tblLinuxSystem.OSRelease, tblMacOSInfo.SystemVersion)
  As OS,
  tblAssets.SP,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tsysAssetRelationTypes.Name As Relation,
  tblAssets1.AssetID,
  tblAssets1.AssetName
From tblAssets
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblAssetRelations On tblAssetRelations.ChildAssetID =
    tblAssets.AssetID
  Inner Join tsysAssetRelationTypes On tsysAssetRelationTypes.RelationTypeID =
    tblAssetRelations.Type
  Inner Join tblAssets tblAssets1 On tblAssets1.AssetID =
    tblAssetRelations.ParentAssetID
  Inner Join tblAssetCustom On tblAssetCustom.AssetID = tblAssets.AssetID
  Left Join tsysOS On tsysOS.OScode = tblAssets.OScode
  Inner Join tsysIPLocations On tsysIPLocations.LocationID =
    tblAssets.LocationID
  Inner Join tblState On tblState.State = tblAssetCustom.State
  Left Join tblLinuxSystem On tblAssets.AssetID = tblLinuxSystem.AssetID
  Left Join tblMacOSInfo On tblAssets.AssetID = tblMacOSInfo.AssetID
Where tsysAssetRelationTypes.Name = 'is located in' And tblState.Statename =
  'Active'
Order By tblAssets.IPNumeric,
  tblAssets.Domain,
  Asset

Active Discussions

Lansweeper Copying computer names that include a hyphen
by  CyberCitizen  
Go to last post Go to first unread
Last post: Today at 4:30:25 AM(UTC)
Lansweeper lansweeper 7
by  Esben.D   Go to last post Go to first unread
Last post: Yesterday at 4:27:34 PM(UTC)
Lansweeper dotNET framework 3.5 deployment
by  Ramezi  
Go to last post Go to first unread
Last post: Yesterday at 3:49:15 PM(UTC)
Lansweeper InTune Scanning not showing all devices
by  TBRIT   Go to last post Go to first unread
Last post: Yesterday at 3:05:17 PM(UTC)
Lansweeper lsAgent MSI installer
by  Sandro  
Go to last post Go to first unread
Last post: Yesterday at 10:52:39 AM(UTC)
Lansweeper Receiving tickets through the email
by  Esben.D   Go to last post Go to first unread
Last post: 7/12/2019 10:10:10 AM(UTC)
Lansweeper Lansweeper PowerShell Modules
by  Esben.D  
Go to last post Go to first unread
Last post: 7/12/2019 8:56:29 AM(UTC)