次の方法で共有


How to get the list for SMTP address and Last connection time for all the users

Summary
This article describes how to use PowerShell Commandlet to get the list for SMTP address and Last connection time for all the users.

 

Steps to implement the request

Step 1: Run the following to authenticate yourself and import PowerShell commands to your local session:

$LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange-ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirectionImport-PSSession $Session

 


Image 1

Step 2: Run the Commandlet to get the SMTP address and Last connection time for all the users

Commandlet to get SMTP address:
    Get-Mailbox | fl EmailAddresses, identity > C:\Emailaddress.csv

 


Image 2

 
Image 3

 
Image 4

 Commandlet to get Last connection time:
    Get-Mailbox -ResultSize unlimited | Get-MailboxStatistics | select-object identity,lastlogontime,lastlogofftime,DisplayName | sort-object DisplayName -descending | export-csv C:\Lastlogontime.csv

 
Image 5

 
Image 6


Image 7

 Enjoy Wink

Comments

  • Anonymous
    August 17, 2014
    Hi Joanna, thanks for your guides, they are very precious resources!
    I notice that on the old guide, like this, the images cannot be displayed.
    If there is something that you can fix it would be great!

    Thank you again and please don't stop to publish guide, I follow you from New Zealand!

    Daniele