skip to Main Content

Find missing SMTP address with PowerShell

The users with a mailbox in Exchange Server need to have a specific SMTP address configured. How to search for the mailboxes with the missing SMTP address in Exchange? The answer is with PowerShell. If we find the missing SMTP address, we can add it to the user mailbox. In this article, you will learn how to find missing SMTP address with PowerShell.

Find missing SMTP address with PowerShell

You can log into Exchange Admin Center (EAC) and open the mailboxes one for one and find the missing SMTP address. I don’t recommend doing that unless you have a lot of time and like to spend it that way.

Do you want to list all SMTP addresses in the Exchange Organization? Read how to list all SMTP addresses with PowerShell »

Search missing SMTP address by domain

Run Exchange Management Shell as administrator. Run the cmdlet to list the mailboxes with the missing domain. Good to know is that it will search both the primary SMTP address and secondary SMTP address in each mailbox for the missing SMTP address.

Search missing SMTP address by name

Maybe you want to search for a name instead of a domain. What do you need to change to make that possible? Change the domain *@alitajran.com to a name that contains the SMTP address. For example, *tajran*. This will search for everything with that name in all the SMTP fields.

List informative result

Add the information you need to the Select-Object cmdlet. This will give you a better view of the mailboxes missing the SMTP address.

Adjust for a cleaner view

For a cleaner look, keep the primary SMTP address and secondary SMTP addresses separated.

The last step is to export the results to CSV file.

Read more: How to bulk remove secondary SMTP address with PowerShell »

Export to CSV file

Export the mailboxes with missing SMTP addresses to a CSV file. This will export the CSV file to C:\temp\. Don’t forget to create a temp folder on the C: drive or edit the export path.

Go the path in File Explorer and open the CSV file with your favorite application. For example, with Microsoft Excel.

Find missing SMTP address with PowerShell CSV file.png

I hope that this article helped you.

What if you want to find a specific SMTP address instead of a missing SMTP address? Read more: Find specific SMTP address with PowerShell »

Conclusion

In this article, you learned how to find a missing SMTP address with PowerShell in Exchange Server. Run the cmdlet in PowerShell to get a list of the mailboxes with missing SMTP address. Adjust the Select-Object cmdlet with the values you want to see. After that, export the list to CSV file and open it with your favorite CSV viewer/editor.

Did you enjoy this article? You may also like Export a list of mailboxes to CSV in Exchange. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top