powershell command to get OOF userlist

Modified on Thu, 30 Jun, 2022 at 2:22 PM

Below command can provide list of users that have Vacation enabled



Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity, StartTime, EndTime, AutoReplyState



Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity, StartTime, EndTime, AutoReplyState 
Identity                                         StartTime              EndTime                AutoReplyState
--------                                         ---------              -------                --------------
exoip.local/Company/Users/Finance/Amanda Morgan  11/18/2020 12:00:00 AM 11/19/2020 12:00:00 AM        Enabled exoip.local/Company/Users/IT/Boris Campbell      11/18/2020 12:00:00 AM 11/19/2020 12:00:00 AM        Enabled exoip.local/Company/Users/Finance/Dylan Piper    11/18/2020 12:00:00 AM 11/19/2020 12:00:00 AM        Enabled exoip.local/Company/Users/Finance/Irene Springer 11/18/2020 5:00:00 PM  11/26/2020 12:00:00 PM      Scheduled exoip.local/Company/Users/IT/Jonathan Fisher     11/19/2020 7:00:00 PM  11/27/2020 12:00:00 PM      Scheduled exoip.local/Company/Users/HR/Zoë Rees            11/18/2020 12:00:00 AM 11/19/2020 12:00:00 AM        Enabled



Below command will export the list in csv file format

Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity, StartTime, EndTime, AutoReplyState | Export-CSV c:\temp\OutofOffice.csv -NoTypeInformation -Encoding UTF8
--

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article