Setting Out of Office (OOF) for Another User in Exchange 2010
It’s a common scenario: a user goes on holiday but forgets to turn on their Out of Office (OOF) message in Outlook, so you have been asked to do it for them. One solution is just to reset their password so you can log in to Outlook Web App as them and do it, but this has several drawbacks, including the fact that they won’t be able to logon again until they return to the office.
Prior to Exchange 2010 the only other option was to give yourself full mailbox access rights and create a new Outlook profile for their mailbox, but again in some organizations this may contravene security and HR policies. However, with Exchange 2010 Microsoft added a new Exchange Management Shell command that lets you configure a user’s OOF settings.
What our user should have done!
Read the Best Personal and Business Tech without Ads
Staying updated on what is happening in the technology sector is important to your career and your personal life but ads can make reading news, distracting. With Thurrott Premium, you can enjoy the best coverage in tech without the annoying ads.
Setting the OOF Message: Preparation
First of all, the user account you are using for this administration task must at least be assigned the Server Management role on the Exchange 2010 Server where the specific user’s mailbox is located. In smaller organizations you will probably use an Exchange administrator account, so you will have this role anyway, but it can be delegated to other users with the Exchange Role Based Access Control (RBAC) feature.
Now, before you start you should make sure you have collected the following information:
- Identity — This can be the alias, username, or SMTP address of the OOF user.
- End Date — We can assume that the start date for the OOF message will be immediately, but when will the user be back in the office? A user who forgets to turn on their OOF is likely to forget to also turn it off again, so its best to automate it.
- Intended Recipients — Should Out of Office messages be sent to everyone who emails the user, or just “known” (i.e. existing contacts and internal) users?
- The OOF Message — You may wish to confirm with the user’s manager what text the OOF message should contain, including details of an alternative contact. Different messages can also be set for external and internal recipients if required.
How to Set the Out of Office Message
Now that you have collected all the information required, go ahead and turn on the Out of Office message using the EMS set-mailboxautoreplyconfiguration command. Logon to your Exchange Server and open the EMS console.
You can learn more about the Set-MailboxAutoReplyConfiguration command syntax, but here is an abbreviated version with the settings you are likely to want. Optional settings are enclosed in square [ ] brackets.
Set-MailboxAutoReplyConfiguration -Identity username -AutoReplyState Enabled/Disabled/Scheduled [-EndTime DateTime] [-ExternalAudience None/Known/All] [-ExternalMessage message] -InternalMessage message [-StartTime DateTime]
Most of those settings should be self-explanatory. As you can see, at minimum the options are to enable or disable OOF messages to internal users and to define the message. However that wouldn’t make a very good example for this tutorial, so I will run the command as you would more commonly use it.
If the command completes successfully you will not receive any confirmation; however, if there is an error you should get a message in red indicating where the problem lies.
Note: For UK users, the EMS requires the US date format (mm/dd/yyyy) — although as we soon shall see it then outputs dates in the UK format!
Testing the Out of Office Setting
Its always a good idea to double-check that your OOF command has worked as intended. You can do this using the Get-MailboxAutoReplyConfiguration command.
As we can see from the above command output it looks like the Out of Office setting is correct, but to make extra sure, you can always test it by sending emails from an internal and external account. However, bear in mind that Exchange will only send the OOF message to each sender once, as subsequent emails will not generate an OOF reply unless it is disabled and then enabled again.
This is yet another demonstration of the power and flexibility of the Exchange Management Shell. Keep in mind that if this is a typical task for you then you can easily save a script of this, allowing you to only change the user and date each time. And with the delegation options available via role-based access control you can even permit a junior member of staff to do it without having to give them full access to senior staff mailboxes or more sensitive Exchange settings.