Power Shell to compile report for last access date for all mailboxes in organization.
$users = Get-Mailbox -ResultSize unlimited
$mailboxstats = $users | Get-MailboxStatistics
$mailboxstats | select
displayname,lastlogontime,lastloggedonuseraccount | Export-Csv
-NoTypeInformation -Path C:\temp\*.csv –Force
If you would like to know from Mailbox server point of view and target just one server.
Get-MailboxStatistics -server Mailbox Server |sort lastlogonTime -Descending >c:\Avi.txt
If you would like to target database you certainly do it.
If you would like to know from Mailbox server point of view and target just one server.
Get-MailboxStatistics -server Mailbox Server |sort lastlogonTime -Descending >c:\Avi.txt
If you would like to target database you certainly do it.
Get-MailboxStatistics -Database "Mailbox Database"
Comments
Post a Comment