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-MailboxAutoReplyConfig uration | Where-Object { $_.AutoReplyState -ne "Disabled" } | Where { $_.SmtpAddress -like "*company.com" } | Select Identity,StartTime,EndTime ,AutoReply State | Export-Csv C:\Temp\OutOfOffice.csv -NoTypeInformation
Get-Mailbox -ResultSize Unlimited | Get-MailboxAutoReplyConfig
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
maybe this will work?