$StartDate = (get-date).AddDays(-2)
$EndDate = (get-date).AddDays(-1)
get-messagetrackinglog -ResultSize Unlimited -EventID "RECEIVE" -Recipient:[email protected] -Server "servername" -Start $StartDate -End $EndDate | format-table Sender, Timestamp, MessageSubject, EventID > e:\count\aliasname.txt
start-sleep -s 30
$aliasnamesub= Get-Content e:\count\aliasname.txt
$aliasnamesubject = $aliasnamesub.Length-5
|