Notification

Icon
Error

Assets: Location maps and assets on them (Built-in)

Posted: Tuesday, August 8, 2017 3:05:29 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 all the location maps and any assets that have been added to them.

The report will only list assets that meet all of the following criteria:
  • The asset state is set to "active".
  • The asset is a ‘Location’.

Code:

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

Active Discussions

Lansweeper Lansweeper --> PowerBI
by  Hendrik.VE   Go to last post Go to first unread
Last post: Today at 12:13:59 PM(UTC)
Lansweeper Report 32 or 64bit software
by  Phofman  
Go to last post Go to first unread
Last post: Today at 11:06:17 AM(UTC)
Lansweeper Deployment issue with certain installer
by  Ruben1   Go to last post Go to first unread
Last post: Today at 10:36:38 AM(UTC)
Lansweeper Mail notification Windows Defender
by  MB@CC-IT  
Go to last post Go to first unread
Last post: Today at 8:00:59 AM(UTC)
Lansweeper Change Management - Voting and Tracking
by  hrhansen   Go to last post Go to first unread
Last post: Today at 7:46:23 AM(UTC)
Lansweeper Lansweeper email Support
by  Esben.D  
Go to last post Go to first unread
Last post: Yesterday at 5:58:17 PM(UTC)
Lansweeper Scanning Methods
by  CyberCitizen   Go to last post Go to first unread
Last post: Yesterday at 1:12:34 AM(UTC)
Lansweeper Asset Group Config
by  CyberCitizen  
Go to last post Go to first unread
Last post: Yesterday at 1:10:54 AM(UTC)