cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
blawson
Engaged Sweeper
Is there a way to delete a single computer from lansweeper via batch file? or make a call to a database stored procedure?
4 REPLIES 4
blawson
Engaged Sweeper
i used the following command and it worked great... not sure if it cleaned up the other tables.

sqlcmd -U username -P password -d lansweeperdb -Q "delete from tblcomputers where computer = 'computername'"

lansweeper is on our sql database server. if it cleans up the database that will be great, we plan on putting this in our custom actions and using it two ways... one as a straight delete this computer from lansweeper, and to delete the machine before we change the computer name.

Please let me know if there are any other tables that need to have the info deleted.
Thanks
Brian
Hemoco
Lansweeper Alumni
blawson wrote:

Please let me know if there are any other tables that need to have the info

No
blawson
Engaged Sweeper
will data in other tables be deleted automatically? Thanks for the super fast reply!
Hemoco
Lansweeper Alumni
Use sql code:

delete from tblcomputers where computer='computername'