Forum Discussion
maxwell2k19
Aug 09, 2019Brass Contributor
schedule recurring Out of Office
Hi All I want to schedule recurring out of office every day. i have shared mailbox and i want to set out of office for shared mailbox for every email which is received from 9PM to 6AM as the users w...
- Aug 05, 2020
Alternatively you can use ScheduledOOF flow for Office 365 tool.
HidMov
Aug 09, 2019Steel Contributor
Hey maxwell2k19
You can set this up with Powershell. Set-MailboxAutoReplyConfiguration can set up auto reply for the shared mailbox
Set-MailboxAutoReplyConfiguration -Identity "Shared Mailed box" -AutoReplyState Scheduled -StartTime “09/08/2019 18:00:01” -EndTime “10/08/2019 09:00:00” -InternalMessage “We're not around!” -ExternalMessage “Dear customer, we're not around, we'll answer your query 9am tomorrow”
You can set this to run as a scheduled task every day to save you having to remember to set it.
Quick note on putting multiple lines in your auto reply; I've found that the one-liner isn't great for one liners, so to get around this we put the the reply as HTML which is then passed to a variable. So for example
$reply = "<html><head></head><body><p>Line 1<P>Line2<P>Line 3<P>Line 4<P>Line 5 </body></html>"
Simply call the $reply for the -InternalMessage and -ExternalMessage portion.
Hope this helps.
Cheers,
Mark
Victor_Ivanidze
Aug 05, 2020Bronze Contributor
Alternatively you can use ScheduledOOF flow for Office 365 tool.
- Victor_IvanidzeDec 17, 2025Bronze Contributor
Update: now ScheduledOOF can toggle Automatic Replies (Out Of Office) on/off based on the user's "Work hours and location" settings: