Forum Discussion
nimby
Mar 24, 2020Copper Contributor
Last Logon time
Is there anyway to download via powershell the last login time for all users? Currently I'm using "Get-EXOMailboxStatistics" but this requires you to provide a username and only obtains the stats for...
kathy
Mar 25, 2020Brass Contributor
Yes. What Vasil said was correct - https://o365reports.com/2019/06/18/office-365-users-last-logon-time-incorrect/.
To get all users last activity time/real last logon time, you can use this script: https://o365reports.com/2019/06/18/export-office-365-users-real-last-logon-time-report-csv/
nimby
Mar 25, 2020Copper Contributor
Hi Kathy,
Thanks for your suggestion, but looking at this script I think I will hit the same issue as it looks like it makes a call to O365/Azure for each user:-
Function Get_LastLogonTime { $MailboxStatistics=Get-MailboxStatistics -Identity $upn
I'm trying to find a way to request the stats for all users with a single call (or at least not 300,000+ calls)