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
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