
4 Dec 2019 by Mike Weaver
Inspire: Winning Hearts and Minds
Successful change management requires inspirational leadership. Here’s how to keep your team on track.
A customer recently asked us how they could generate a report showing which users in their company had an Out-Of-Office (OOO) enabled.
This is something that we do not yet report on in our Office 365 Reporting application but can be easily done using PowerShell.
First, connect to Office 365 using Powershell.
Then run the following CmdLet:
Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity,StartTime,EndTime,AutoReplyState
This will list all mailboxes in your Office 365 tenant that have either a Scheduled or Enabled Out-Of-Office auto reply message.
For example:
PS C:\Users\alan\Desktop> Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity,StartTime,EndTime,AutoReplyState
Identity StartTime EndTime AutoReplyState
-------- --------- ------- --------------
alan 10/06/2014 11:00:00 11/06/2014 11:00:00 Enabled
If you want the results in a file, you can simply add | Export-CSV OutOfOffice.csv -NoTypeInformation to the end of the CmdLet and it will export it to a CSV file.