The script sets an Out-of-Office image for a user in Exchange.
To set OOF images using Adaxes, you can create a custom command that runs the script. For more information, see Create a Custom Command.
PowerShell
$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')