We have a tri-borough tenant that has three domain addresses and I have bee asked to get the Out of office extract for mailboxes for a single domain. The below doesn't seem to work, doesn't throw an error and it runs but no output is generated.
Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Where { $_.SmtpAddress -like "*company.com" } | Select Identity,StartTime,EndTime,AutoReplyState | Export-Csv C:\Temp\OutOfOffice.csv -NoTypeInformation