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 LSAgent has forgotten x64 Windows applications
by  thoughtmonkey   Go to last post Go to first unread
Last post: Today at 8:06:40 AM(UTC)
Lansweeper Lsremote "No supported authentication methods!"
by  Duiker  
Go to last post Go to first unread
Last post: Today at 7:52:24 AM(UTC)
Lansweeper Scan Uptime.
by  TimAlex   Go to last post Go to first unread
Last post: Today at 7:32:41 AM(UTC)
Lansweeper Force SNMP?
by  kuku1122  
Go to last post Go to first unread
Last post: Today at 6:54:09 AM(UTC)
Lansweeper Performance scanning - incorrect values
by  Richard_Lan   Go to last post Go to first unread
Last post: Yesterday at 4:26:02 PM(UTC)
Lansweeper Windows firewall rules
by  pryan67  
Go to last post Go to first unread
Last post: Yesterday at 2:56:52 PM(UTC)
Lansweeper Run outside of our domain?
by  pryan67   Go to last post Go to first unread
Last post: Yesterday at 2:53:05 PM(UTC)
Lansweeper Add logic to certain ticket submission
by  Esben.D  
Go to last post Go to first unread
Last post: Yesterday at 1:02:46 PM(UTC)