Quantcast
Channel: Exchange Server 2010 forum
Viewing all articles
Browse latest Browse all 19214

Sometimes I wonder about the people writing these...

$
0
0

Tip of the day #85:

Wondering how many log files are generated per server every minute? Quickly find out by typing:

Get-MailboxDatabase -Server $env:ComputerName | ?{ %{$_.DatabaseCopies | ?{$_.ReplayLagTime -ne [TimeSpan]::Zero -And $_.HostServerName -eq $env:ComputerName} } } | %{ $count = 0; $MinT = [DateTime]::
MaxValue; $MaxT = [DateTime]::MinValue; Get-ChildItem -Path $_.LogFolderPath -Filter "*????.log" | %{ $count = $count + 1; if($_.LastWriteTime -gt $MaxT){ $MaxT = $_.LastWriteTime}; if($_.LastWriteTim
e -lt $MinT){ $MinT= $_.LastWriteTime} }; ($count / ($MaxT.Subtract($MinT)).TotalMinutes) } | Measure-Object -Min -Max -Ave

Quickly?  Overall I appreciate the Tip of the day feature but found this one a little strange, I would just look on the drive where the log files are stored and see how many had been created in the last minute.

Jason


Jason Meyer


Viewing all articles
Browse latest Browse all 19214

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>