Powershell: Calculating Seven Day Retention for Security Event Logs
2010/11/17
I needed to figure out how much space was required to maintain 7 days of event log entries for the Security event log on my SQL Servers. Basically, this is a simple calculation where you check the size of the current event log, find the earliest event, and calculate how many hours of coverage you have. You then extrapolate that to 7 full days (168 hours). It's a simple script and I'm sure it could be more efficient, but it works.