Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


DNS Clean Up

 
Logged in as: Guest
arrSession:exec spGetSession 2,16,34266
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> Post a VBScript >> DNS Clean Up
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 DNS Clean Up - 5/8/2006 3:52:36 AM  1 votes
  mcds99


Posts: 407
Score: 4
Joined: 2/28/2006
Status: offline
I work as the DNS and DHCP Administrator for a large corporation that has 100`s of thousands of DNS entries, and about 17,000 DHCP scopes.
One of my tasks when I took the job in January is to clean up DNS, OMG!
This is a MS shop no BIND.
The one catch is I have to know the machine has not pinged for 30 days and I have to keep records to that end.

It took me a while to devise a way to accomplish this task so, I though I would share it to save anyone else the time of having to do this.

I first export all the domains where NON - DHCP subnets exist.
I then run a script that I call wmiPing.vbs
It simply reads the host names from a text file, does a wmiPing and writes the results to a tab delimited text file.
I open the file in EXCEL and eliminated the live hosts we have a lot of servers UNIX, Windows, Linux, Mainframe.

I ended up with several spreadsheets containing host names for the various domains. I need to keep all the host/domains straight.
I can then wmiPing them using the spreadsheets and eliminate the hosts that come back on line over time.

It may be convoluted or it may be nuts but it works (most likly NUTS) ;-D

      

< Message edited by ebgreen -- 5/8/2006 11:50:16 PM >


_____________________________

Sam

Keep it Simple Make it Fun KiSMiF
 
 
Post #: 1
 
 RE: DNS Clean Up - 5/8/2006 11:49:41 PM   
  ebgreen


Posts: 4595
Score: 29
Joined: 7/12/2005
Status: offline
Thank you for sharing your code. I have a couple of comments that are primarily procedural.

1) The tags for a code block here are [ code] and [ /code] (without the spaces).
2) There is no need for 2 FileSystemObjects. You could just use one to open both TextStream.
3) There is no need for WScript.Quit on the last line.

Thanks again for sharing with the community. As I have always maintained, if the script does what you want the way you want then by definition it is written correctly.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to mcds99)
 
 
Post #: 2
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> Post a VBScript >> DNS Clean Up Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts