Exchange SMTP Address Search

Welcome Forums General PowerShell Q&A Exchange SMTP Address Search

Viewing 2 reply threads
  • Author
    • #189664
      Topics: 1
      Replies: 0
      Points: -9
      Rank: Member

      Hi All

      Ive been building a script within exchange that allows me to search all SMTP entries.  For some reason the script is failing now but was working fine on Friday.  Any ideas what might be going on.

      Get-Recipient -resultSize unlimited | select name -expand emailAddresses | where {$_.smtpAddress -match "SMTPAddress"} | Format-Table name, smtpaddress
    • #189754
      Topics: 12
      Replies: 1642
      Points: 2,660
      Helping Hand
      Rank: Community Hero

      Failing with what error message? What is the result and expected result?

    • #189757
      Topics: 1
      Replies: 20
      Points: 109
      Helping Hand
      Rank: Participant

      Walking through each section of your command, the “| where {$_.smtpAddress -match "SMTPAddress"}” part didn’t work, so I changed it to make sure that field wasn’t empty, so it changed it to “| ? {$_.SmtpAddress -ne $null}“, see below.


      get-recipient -resultsize unlimited | select name -expand emailaddresses | ? {$_.SmtpAddress -ne $null} | ft Name,SMTPAddress -auto

Viewing 2 reply threads
  • The topic ‘Exchange SMTP Address Search’ is closed to new replies.