Exchange 2013 - Set out of office using PowerShell

I need to set a default out of office text for all users in our company.  The out of office text has to be customized for each user (see bold and italic text).  All the information are already set in AD.  These are:

The deputy
The deputy's phone number
The deputy's email address
The person who sets the out of office
The position of the person who sets the out of office

If Michael Job (which is the person who sets the out of office in our example) has two customized attributes (the customized attribute reflects the deputy), it should take the second one.  See the example below:

***********************************************
Thank you for your mail. I'm absent at the moment. In urgent cases please contact Alen Green (AGR@contoso.com) / +1 33 666 45 45.

Best regards
Michael Job
Sales Assistant

***********************************************

Michael-Job.jpg
Any idea who I can set the out of office for the entire company?
whenzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Not feasible, sorry. You can switch OoO (OOF) on and off, but not set the body. At least I have not met any code (VBA or PowerShell) being able to do it. You can see my best try in http://www.experts-exchange.com/Q_28612274.html.

The common way to manage custom OOF tasks is by creating rules on receive. The issue with that is that each mail gets a response, while OOF caches sender addresses and hence sends out OOF only once per sender. But rules are much easier to create and change.

On another note, this is an one-time job (per user), so usually not worth the added effort. My recommendation is to build a PS script to get the text, and then manually set up that text in OWA.
0
imkotteesSenior Messaging EngineerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Oops, I forgot you can't do that with Outlook only or Exchange 2007 and earlier. But since Exchange 2010 you can do with Set-MailboxAutoReplyConfiguration, as mentioned in the link.
Setting a formatted message is somewhat difficult, but setting a simple text is easy. For formatted text, we should use a template to modify.
Now the "only" issue is to get the properties. If you could show a get-mailbox or get-user retrieving the required properties for setting up the OOF, it would be great.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.