Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
pcrockett
Engaged Sweeper
Is it possible to Cleanup LS by querying the contents of AD?

I need my Lansweeper database to contain only what is actually still present on the network. We are constantly replacing old computers and we remove them from Active Directory when we retire them, so is there a way or perhaps even a cleanup script option that I could use to compare the database with AD and remove any non-existent computers present?

Does the Pro version do this? Is it possible to write external scripts to achieve this by accessing the database in SQL and AD?

Thanks in advance.
12 REPLIES 12
robinb
Engaged Sweeper
I have posted a VBScript in the query and report forum doing the job, You can add it as a schedule task on a server
Cobra7
Champion Sweeper
FYI: also have:

http://www.lansweeper.com/forum/yaf_postst1076_Cleaning-COMPUTERS-not-in-Active-Directory.aspx

Not as good as a service, but I know for a fact it works.
pcrockett
Engaged Sweeper
I apologize for my delay in response. A couple of weeks have turned into months and I am now starting to get back to this project. I haven't forgotten about this post, but it may be another month before I have implemented it myself to be able to respond with my process and the code and areas that need to be modified with details.

If anyone else has done this already and would like to share, it would be much appreciated by everyone!
jreimer1
Engaged Sweeper
Any one got any new information on getting this to work as a service. Also what is need to be changed so it all works.

Cobra7
Champion Sweeper
Could anyone tell me if there is any data in this script that needs editing?

For example:
Dim oLansweeperConnection1 As SqlConnection = New SqlConnection
oLansweeperConnection1.ConnectionString = "Data Source=SERVER;Initial Catalog=Lansweeper;User ID=lssqluser;Password=**********"


Will I need to change these values in the hard code?
jacn96
Engaged Sweeper
hello as I can run these scripts from Colombia and I am beginning to use this fantastic tool but as I told them to start now.
Hemoco
Lansweeper Alumni
To compile you can download visual studio express (free)
w1ngl
Engaged Sweeper
Do you have an compiled version?
Or how do I run this?
pcrockett
Engaged Sweeper
Outstanding! Thank you for your help! I will be working on this over the next couple of weeks and I will repost later with results.

Archive

This board contains archived posts from the retired Lansweeper Forum and Insiders Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now