cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MikeInLa
Champion Sweeper
Can a script be run on the Lansweeper server that would remove certain asset types from the database? For instance, if I want to remove all "Monitors". I know I can just click Assets and type "mon" under device type then select all and delete. But since they just come right back, I thought maybe I could schedule a script that would run and do this for us automatically.
1 ACCEPTED SOLUTION
Susan_A
Lansweeper Alumni
FYI for everyone: asset type exclusions were added in Lansweeper 5.2.

View solution in original post

5 REPLIES 5
Susan_A
Lansweeper Alumni
FYI for everyone: asset type exclusions were added in Lansweeper 5.2.
MikeInLa
Champion Sweeper
I had not considered that. I'll give it a try, thanks...
Hemoco
Lansweeper Alumni
In the meantime you can change the status of the monitors to "Don't show". Almost all reports are filtered on assets with status = active. A rescan doesn't change this status.
MikeInLa
Champion Sweeper
Exactly why I want the option to NOT add monitors (or certain other device types). I just want my workstations, servers, and printers. Having literally everything makes things cluttered, confusing even when pulling reports. I frequently have to manually clean up exported xls files. Like you said, it will just add the monitors again on the next scan. I would almost like to downgrade now because of this... go back to when those were not automatically added. Here is my problem: We have a script on every workstation that runs LSPush when the user logs in to Windows. The only thing we actually scan on a schedule from the server are our servers (and none of those have monitors). So, before this feature was added, we only had workstations, servers, and printers. Now when my workstations "check in" (lspush) each morning, I end up with 100's of monitors added to my inventory. I would rather not have this auto-added every time a workstation checks in. Please add a way for us to "opt out" of this function. I have already requested this in the wish list thread.
Hemoco
Lansweeper Alumni
Deleting monitors doesn't really make sense. The monitor assets will return when the corresponding Windows computers are rescanned, as you indicated.

We no longer provide support for writing, running or scheduling database scripts, as this falls outside of standard Lansweeper functionality. A basic script that deletes monitor assets can be seen below. We cannot provide further support however and recommend that you back up your database before executing any scripts.
delete from tblassets where assettype = 208