Forum Discussion
EmyLoanzon
Mar 20, 2018Iron Contributor
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...
- 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)
VasilMichev
Mar 20, 2018MVP
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)
EmyLoanzon
Mar 20, 2018Iron Contributor
Thank you! That worked.