Script repository
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.