Hi ABrown. You could search and replace in the email template. From your code example I have added some replace commands. Basically in the html template you would have %username% and that would get replaced with the username from the Adaxes property %username%.
$exchangeServer = "exchange"
$session = New-PSSession -connectionURI "http://$exchangeServer/powershell" -ConfigurationName Microsoft.Exchange
Import-PSSession -session $session
$AutoReplyMessage = [io.file]::ReadAllText("C:\Auto_Reply.htm")
# Replace strings in the autoreply text, double % required so Adaxes does not convert
$AutoReplyMessage = $AutoReplyMessage.Replace("%%username%%","%username%")
$AutoReplyMessage = $AutoReplyMessage.Replace("%%adm-ManagerFullName%%","%adm-ManagerFullName%")
$AutoReplyMessage = $AutoReplyMessage.Replace("%%adm-ManagerEmail%%","%adm-ManagerEmail%")
Set-MailboxAutoReplyConfiguration -Identity %username%@domain.com -AutoReplyState Scheduled –EndTime “1/1/2050” -ExternalMessage "$AutoReplyMessage"
Remove-PSSession -Session $session
Alternatively you could put the email template inside the script and let Adaxes replace the properties:
$AutoReplyMessage = @"
<html>
...
Sorry %username% has left.
...
</html>
"@