How to check out of office status in Exchange
Get-MailboxAutoReplyConfiguration “username”
Replace the “username” phrase with the user mailbox name to get the result.
Among other properties, command returns additional information.
To get the automatic reply status for all mailboxes:
Get-Mailbox | Get-MailboxAutoReplyConfiguration
Filter and show only users with Out-Of-Office enabled:
Get-Mailbox | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState –eq “scheduled” }
Disable the OOF message for the selected mailbox:
Set-MailboxAutoReplyConfiguration -Identity “user” -AutoReplyState Disabled