Forum Discussion
dannytveria
Apr 24, 2021Brass Contributor
Export last log on more 90 days Office 365
Hi, I'm trying to export csv file, with users that not logged on more then 90 days. I tried to run this script: Get-Mailbox -RecipientType 'UserMailbox' | Get-MailboxStatistics | Sort-Object La...
AndySvints
Apr 26, 2021Iron Contributor
Hello dannytveria,
Add -ResultSize Unlimited to Get-Mailbox:
Get-Mailbox -RecipientType 'UserMailbox' -ResultSize Unlimited | ...Also try to remove filter with LastLogonDate just to test of that it works.
It might be that there are no users who accessed their mailbox more that 90 days ago.
Hope that helps.
dannytveria
Apr 26, 2021Brass Contributor
It`s worked with the LastLogonDate.
the LastLogonDate field is when the user last login to his mailbox on 365?
Or which field actually shows the last use mailbox?
- AndySvintsApr 26, 2021Iron Contributor
The research was done on many real-time users, and we have concluded that getting Office 365 user’s inactive time from LastUserActionTime is the best.
Reference: https://o365reports.com/2019/06/18/office-365-users-last-logon-time-incorrect/
Hope that helps.
- dannytveriaApr 27, 2021Brass ContributorHi Andy,
thanks for your gr8 help.
U was very helpfull