Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Exchange 2013
- $ErrorActionPreference= 'silentlycontinue'
- $empty="{}"
- $internal="[a-z0-9!#\$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#\$%&'*+/=?^_`{|}~-]+)*@yourdomain\.tld$"
- Get-MessageTrackingLog -MessageSubject "Undeliverable" | Sort-Object -Property Recipients -Unique | foreach ($_.Recipients){
- if(($_.Recipients -ne $empty) -and ($_.Recipients -match $internal)){
- echo $_.Recipients
- Get-Messagetrackinglog -sender:$_.Recipients -EventID "FAIL" | ft Timestamp, Recipients
- }
- }
Add Comment
Please, Sign In to add comment