We help IT Professionals succeed at work.

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

Fais Kan
Fais Kan asked
on
597 Views
Last Modified: 2017-07-15
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
Comment
Watch Question

Jakob DigranesSenior advisor
CERTIFIED EXPERT

Commented:
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?

Author

Commented:
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.
Jakob DigranesSenior advisor
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Author

Commented:
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
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
MASEE Solution Guide - Technical Dept Head
CERTIFIED EXPERT
Most Valuable Expert 2017

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.