Enable Out of Office thru Powershell

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 –StartTime06/30/2014–EndTime07/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

https://techwizard.cloud

https://syscloudpro.com/

 

Advertisement

11 thoughts on “Enable Out of Office thru Powershell

  1. 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

    • 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

  2. 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

  3. 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…

  4. Pingback: Exchange: OWA – Enable Out of Office thru Powershell | MS Tech BLOG

  5. 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?

  6. Pingback: [Question] Error when trying to set OOO (Out Of Office) in exchange 2013 - How to Code .NET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s