I want to get list of all inactive mailboxes with their primary SMTP address and last logon information.
Get-Mailbox -ResultSize Unlimited | Get-MailboxStatistics | Select DisplayName, LastLoggedOnUserAccount, LastLogonTime
This command returns all inactive mailboxes with their display name but problem is that I want to get this list with PrimarySMTPAddress of mailbox because there is a possibility that multiple accounts can have same display name. Is there a way to get it with PrimarySMTPAddress?