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: 155
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 Deployment Java
by  mlachance   Go to last post Go to first unread
Last post: Today at 4:46:38 PM(UTC)
Lansweeper Custom OID Scanning Range
by  tcooper  
Go to last post Go to first unread
Last post: Today at 4:32:59 PM(UTC)
Lansweeper Approved Software
by  AZHockeyNut   Go to last post Go to first unread
Last post: Today at 4:07:58 PM(UTC)
Lansweeper Scanning targets - ignore assets with LSagent
by  AZHockeyNut  
Go to last post Go to first unread
Last post: Today at 4:01:44 PM(UTC)
Lansweeper LastLogon Data
by  ghelpdesk   Go to last post Go to first unread
Last post: Today at 3:53:04 PM(UTC)
Lansweeper Duplicate MAC address during asset rename
by  TJ  
Go to last post Go to first unread
Last post: Today at 3:48:49 PM(UTC)
Lansweeper Repeating Deployments
by  mlachance   Go to last post Go to first unread
Last post: Today at 1:25:48 PM(UTC)
Lansweeper Deployment - Ideas
by  mlachance  
Go to last post Go to first unread
Last post: Today at 1:22:40 PM(UTC)