Exchange Server Count Number Of Users With Specific SMTP Domain

This KB will show you how to count the number of users with a specific SMTP domain.

The Code

So, for example, If you have a domain called NTWEEKLY.COM and you want to find out how many users have that domain set as their primary SMTP address, this code Is for you.

get-mailbox -resultsize unlimited | where {$_.primarysmtpaddress -like "*"} | Measure-Object