Forum Discussion

EmyLoanzon's avatar
EmyLoanzon
Iron Contributor
Mar 20, 2018

Getting stats for emails delivered with blank subject lines

Good Morning! I have to get stats on how many emails we get that have blank subject lines. I tried these Exchange PS commands: $subj =$null Get-MessageTrace -StartDate "02/20/2018" -EndDate "03...
  • VasilMichev's avatar
    Mar 20, 2018

    Search-Mailbox will not work, at least I wasn't able to get it to work when I toyed with this last time. But for message trace, something like this should do it:

     

    Get-MessageTrace -StartDate "02/20/2018" -EndDate "03/20/2018" | Select-Object Received, SenderAddress, RecipientAddress, Subject, Status, ToIP, FromIP | Where {!$_.subject}

    You should also be able to use

     

     

    where ($_.Subject -eq $null)

Resources