Share via


DHCP Log Retention

Question

Tuesday, August 24, 2010 7:55 PM

In Windows Server 2008 R2, is there a way to retain DHCP logs longer than 1 week without manual intervention (i.e. manually copying, scripting, etc.)? I was hoping for something like a registry entry that would keep the logs for x number of days.

All replies (8)

Monday, August 30, 2010 9:35 PM ✅Answered

I ended up using the PowerShell script from this guy's blog:

http://jasonscottcarter.wordpress.com/2008/06/25/dhcp-log-backups/


Tuesday, August 24, 2010 11:41 PM

The logs overwrite every week.  I don't beleive that there is an option to extend it.  If there was, the filenaming convention would have to be changed as well since the files are named after the days of the week.  For example, the Monday log is named... "DhcpSrvLog-Mon"

So...as you may have guessed, yes a scheduled task to copy them off to another location and rename them by appending date specfic info to the filename should take care of that.  I had been doing it for years.  Now, I got someone that is very good at VBScript to run a weekly job, read the information from the logs and insert the info into a DB table for further manipulation/reporting/etc.

Visit: anITKB.com, an IT Knowledge Base.


Wednesday, August 25, 2010 3:02 AM

Hi Patrick, 

 

Thanks for post here.

 

I’m afraid that a week is a by design DHCP audit log period and can’t be changed .

However ,according the delete policy of DHCP audit log files , if you meet the condition below, the record of last week will not be overwrite:

 

·         If the file has existed but was modified within the previous 24 hours, the file is not overwritten.

 

Meanwhile ,JM may provide a good method that help you to archive the audit log.

 

Please take time to read the article below :

 

All about DHCP Auditing

http://blogs.msdn.com/b/anto_rocks/archive/2006/11/02/all-about-dhcp-auditing.aspx

 

Thanks.

 

Tiger Li

 

TechNet Subscriber Support in forum

If you have any feedback on our support, please contact [email protected]  

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Monday, August 30, 2010 7:36 AM

Hi Patrick,

Please feel free to let us know if the information was helpful to you.

Thanks,

Tiger Li

TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.


Friday, January 14, 2011 5:49 PM

The link to jasonscottcarter's PS script is no longer any good. Since this is a technical forum and accepts 'text' can you just share the script here?


Tuesday, March 1, 2011 7:56 PM | 1 vote

I added the scipt to my blog since that guy's blog is no longer active.

http://patrickhoban.wordpress.com/2011/03/01/1352/

Patrick Hoban http://patrickhoban.wordpress.com


Tuesday, January 3, 2012 4:17 PM

this is a DEAD link


Wednesday, January 4, 2012 5:46 AM

Yes it is. I posted the script on my blog.

http://patrickhoban.wordpress.com/2011/03/01/1352

Patrick Hoban
http://patrickhoban.wordpress.com