Office 365 / List Exchange Users Last Access Time

Author by Andrew Bronstad

When it comes to Office 365 you need to ensure that users are actually using their accounts because you may be paying for licenses that are not being used.  I recently have worked with a client that is very budget conscious and doesn’t want to purchase additional Office 365 licenses if we have users assigned licenses that are not using them.  Office 365 give you the same ability as on-premise Exchange to query if mailboxes are being logged into.  Here are the steps below to run a query against your Office 365 tenant to verify mailboxes are being logged into: 1. Install the Microsoft Online Services Module (x86) - http://go.microsoft.com/fwlink/p/?linkid=236345 (x64) - http://go.microsoft.com/fwlink/p/?linkid=236293 2. Open Microsoft Online Services Module for Windows PowerShell 3. $Cred = Get-Credential (Type in your Microsoft Online Services Credentials, someone@domain.onmicrosoft.com) 4. $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic -AllowRedirection 5. Import-PSSession $Session 6. Get-Mailbox | Get-MailboxStatistics | Sort DisplayName | FT -AutoSize DisplayName, LastLogonTime > “path to output” 7. Open file outputted in step 6 in Excel
Author

Andrew Bronstad

Managing Architect - Unified Communications