→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pondert
Engaged Sweeper
Is there a way to automatically remove assets that are not detected after a specific period of time. I'm talking about non-computer assets such as old switches, printers, network devices ext.. If not is there a script I can run that will remove those type of assets not seen for lets say 30 days?
1 REPLY 1
Hemoco
Lansweeper Alumni
You can run the script below in the Lansweeper web console under Configuration/Scanning Setup/Database Scripts. It will delete all non-Windows assets from your database whose "last seen" date is older than 30 days. We recommend performing a database backup before executing any scripts, just to be safe.
delete from tblassets where assettype <> -1 and lastseen < GetDate () - 30