Set same on Mulitple

CSV with Heading UserPrincipalName
Txt file with the HTML Code for the reply
Connected to Exchange via powershell

 

This sets External message the internal message is set blank
$Extmessage = Get-content -Path C:\Temp\externalmessage.txt
Import-Csv C:\temp\Mailboxes.csv | ForEach-Object {
$user1 = $_.”UserPrincipalName”
Set-MailboxAutoReplyConfiguration -identity $user1 –AutoReplyState Enabled –InternalMessage ” –ExternalMessage “$Extmessage”
}

check it has updated

Import-Csv C:\temp\Mailboxes.csv | ForEach-Object {
$user1 = $_.”UserPrincipalName”
Get-MailboxAutoReplyConfiguration -identity $user1 | select Identity,ExternalMessage| fl
}