Advertisement
AyrA

Exchange Tip 85

Jun 26th, 2013
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 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($_.LastWriteTime -lt $MinT){ $MinT= $_.LastWriteTime} }; ($count / ($MaxT.Subtract($MinT)).TotalMinutes) } | Measure-Object -Min -Max -Ave
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement