Script repository

Set out-of-office image

Updated on: Jan 18, 2026, Views: 3078

Exchange

The script sets an out-of-office image for a user in Exchange. To execute the script, create a business rule, custom command or scheduled task configured for the User object type.

$html = @"
<html>
 <body>
  <p><img src='http://www.example.com/MyImage.png'></p>
 </body> 
</html>
"@

$mailboxParams = $Context.TargetObject.GetMailParameters()

$automaticReplies = $mailboxParams.AutoReplyConfiguration
$automaticReplies.InternalMessage = $html
$automaticReplies.ExternalMessage = $html

$mailboxParams.AutoReplyConfiguration = $automaticReplies
$Context.TargetObject.SetMailParameters($mailboxParams, 'ADM_SET_EXCHANGE_PARAMS_FLAGS_NONE')

Comments 0

You must be signed in to comment.

    Got questions?

    Support Questions & Answers

    We use cookies to improve your experience.
    By your continued use of this site you accept such use.
    For more details please see our privacy policy and cookies policy.