Link to home
Start Free TrialLog in
Avatar of Fais Kan
Fais Kan

asked on

Powershell Get-MailboxAutoReplyConfiguration Out Of Office results based on a single domain email address

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
Avatar of Jakob Digranes
Jakob Digranes
Flag of Norway image

Get-Mailbox -ResultSize Unlimited | Where { $_.SmtpAddress -like "*company.com" } | Get-MailboxAutoReplyConfiguration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Select Identity,StartTime,EndTime,AutoReplyState | Export-Csv C:\Temp\OutOfOffice.csv -NoTypeInformation

maybe this will work?
Avatar of Fais Kan
Fais Kan

ASKER

Thank for coming back to my question. I have tested the above and it runs for some time then stop by itself without generating any output.  If I take out the Where { $_.SmtpAddress -like "*company.com" } from the cmdlet then it generates the output on all multiple domain email addresses.
SOLUTION
Avatar of Jakob Digranes
Jakob Digranes
Flag of Norway image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I tried the above and it is working but would not display the out of office message apart from Out Of Office status Enabled or Disabled where the one I shared would if you remove | Where { $_.SmtpAddress -like "*company.com" } and export it as .html format
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- Fais Kan (https:#a42045992)
-- Jakob Digranes (https:#a42041915)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

abbasiftt
Experts-Exchange Cleanup Volunteer