Notification

Icon
Error

Report for computers marked as custom state but scanned recently

Posted: Thursday, April 4, 2019 1:28:23 PM(UTC)
JacobH

JacobH

Member Original PosterPosts: 164
0
Like
I mark computers as a certain state that aren't meant to be online, such as STOCK, DECOMMISSIONED, RECYCLED, SOLD, etc... but, in the case of STOCK, they are provisioned and Lansweeper doesn't mark them as active, though it does scan them.

So, I've made a report that you can have email you, if a computer comes online that you aren't expecting (i.e. you marked it as X custom state)... and it's where stuff has been seen in the past 3 days... (you can modify that)


You take the below report and modify the
Code:
And tblAssetCustom.StateName in ('Stock','Decommissioned')
criteria to whatever state you're looking for.


Code:

Select Top 1000000 tblAssets.AssetID,
  tblAssets.AssetUnique,
  tblAssets.Domain,
  tblAssets.IPAddress,
  tsysOS.OSname,
  tsysIPLocations.IPLocation,
  tblComputersystem.Lastchanged,
  tsysOS.Image As icon,
  tblAssets.Firstseen,
  tblAssets.Lastseen,
  tblAssets.Lasttried,
  tblAssetCustom.PurchaseDate,
  tblAssetCustom.Warrantydate,
  tblAssetCustom.Manufacturer,
  tblAssetCustom.Model,
  tblAssetCustom.Serialnumber
From tblComputersystem
  Inner Join tblAssets On tblComputersystem.AssetID = tblAssets.AssetID
  Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
  Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
  Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
    And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblAssets.Lastseen > GetDate() - 3
  And tblAssetCustom.Statename in ('Stock','Decommissioned')
Order By tblAssets.AssetName


Active Discussions

Lansweeper non-active computer report
by  Apaulcolypse   Go to last post Go to first unread
Last post: Yesterday at 5:16:21 PM(UTC)
Lansweeper Report for showing CPUs below or above
by  GBA Craig  
Go to last post Go to first unread
Last post: 7/18/2019 3:38:41 PM(UTC)
Lansweeper Hardware list
by  GBA Craig   Go to last post Go to first unread
Last post: 7/18/2019 3:34:43 PM(UTC)
Lansweeper Top 10 users submitting tickets
by  LGuth  
Go to last post Go to first unread
Last post: 7/17/2019 9:29:44 PM(UTC)
Lansweeper Microsoft Patch Tuesday Report - July 2019
by  Noobmode   Go to last post Go to first unread
Last post: 7/17/2019 8:48:08 PM(UTC)
Lansweeper Custom Scanning - file not existing
by  Bruce Garoutte  
Go to last post Go to first unread
Last post: 7/17/2019 8:19:50 PM(UTC)
Lansweeper MouseJack vulnerability affected devices report
by  Viper   Go to last post Go to first unread
Last post: 7/16/2019 5:19:14 PM(UTC)
Lansweeper TPM support
by  Sander Eerdekens  
Go to last post Go to first unread
Last post: 7/16/2019 1:38:17 PM(UTC)