Hi Readers,
With the advent of Exchange 2010 we have got the new feature of setting OOO thru powershell.
Setting Up out of office by Exchange shell:
Set-MailboxAutoReplyConfiguration -identity “Vikassukhija@Labtest.com” –AutoReplyState Scheduled –StartTime “06/30/2014” –EndTime “07/02/2014” –ExternalMessage “Thanks for your mail. I am out-of-office and do not have access to mails. I will return on 02nd July 8 PM CST. If your matter is urgent, please drop you email to sukhija@labtest.com” -InternalMessage “Thanks for your mail. I am out-of-office and do not have access to mails. I will return on 02nd July 8 PM CST. If your matter is urgent, please drop you email to sukhija@labtest.com”
If User needs external OOO as well:
-ExternalAudience:All parameter should be used.
Removing Out of office by Exchange Shell:
Set-MailboxAutoReplyConfiguration “Vikassukhija@Labtest.com” –AutoReplyState Disabled –ExternalMessage $null –InternalMessage $null
You can also utilize Get-MailboxAutoReplyConfiguration -Identity “Vikassukhija@Labtest.com” to check the OOO that has been setup.
Tech Wizard
Hi Sukhija:
Nice and concise post. mind if I ask you a question?
I followed your instruction and “get-mailboxautoreplyconfiguration” show the OOO is enabled, but the email is still coming through when I tested it with an external email address.
Here is my setup
SBS2011, exchange 2010
I am using exchange management shell on the same machine that hosted our SBS and exchange.
I loaded the target email account on outlook 2013 and test it with a personal gmail account
Eventually, I am trying to do a recurring OOO with task scheduler. so only between 6 PM to 9 AM it will send out message on a daily basis automatically. but I need to get this power shell work first
Thanks for your time and expertise
To make it working for external recipient addresses, use -ExternalAudience:All parameter
Thanks. I added “-externalaudience: all” to the line but it does not trigger the auto reply still. Is there anything else I am missing?
Thank you
The only other thing is on exchnage, under Organization –> Hub Transport –> remote domains –> check setting if external OOO is disabled.
Hi, on the remote domain, we have a default and a * on the domain.
on the general tab of the properties, “allow external out of office messages and legacy out of office messages…” is checked.
on the message format tab, “allow automatic replies” is not checked and I checked it.
The message is still coming through without the automatic reply…
On the send connectors tab, we do have a outbound rule enabled to Google APPS. We used to have Postini for email filtering service and they got bought out by Google APPS, I will give them a call to see if they block the automatic reply…
Anyway, I really appreciate your help and if you can think of something else that might help, please share with me. Thank you
Hi I just logged in to the email account via OWA and the automatic reply setting does reflect the cmdlets from power shell. So, it might be a outloook web app problem now…
Pingback: Exchange: OWA – Enable Out of Office thru Powershell | MS Tech BLOG
Thanks Sukhija Vikas, this PS command helped me a lot…!
Hi Sukhija,
I am trying to use this command however I want to incorporate some line breaks into the text of the message. The command sets the message fine but does not include the formatting. I’m using `r`n to try and do this. Can you help at all?
Super sir
Pingback: [Question] Error when trying to set OOO (Out Of Office) in exchange 2013 - How to Code .NET