Push HTML Format Email Signature in Office365 from powershell

$sig = Get-Mailbox -Identity “rajan.maharjan”

Set-MailboxMessageConfiguration -Identity $sig.Alias -DefaultFontName ‘Arial’ -AutoAddSignature $true -AutoAddSignatureOnReply $true -SignatureHtml “<html><body><table border=’2′ cellspacing=’3′ cellpadding=’3′ style=’font-family:arial;’ width=’100%’>
<tbody>
<tr>
<td rowspan=’2′ valign=’middle’ style=’width:200px;’ align=’center’><a href=’http://rajanmaharjan.com/?utm_source=logo&amp;utm_medium=signature’ target=’_blank’ ><img src=’http://rajanmaharjan.com.np/logo.png’ /></a>
<p style=’margin-top:20px’>
<span><a href=’https://www.facebook.com/maharjan.rajan’ target=’_blank’ rel=’noopener’><img alt=’facebook icon’ style=’border:0; height:25px; width:25px;’ src=’http://rajanmaharjan.com/icons/facebook.png’ width=’15’ border=’0’></a>&nbsp;&nbsp;</span> <span><a href=’https://twitter.com/rajan_maharjan’ target=’_blank’ rel=’noopener’><img alt=’twitter icon’ style=’border:0; height:25px; width:25px;’ src=’http://rajanmaharjan.com/icons/twitter.png’ width=’15’ border=’0’></a>&nbsp;&nbsp;</span> <span><a href=’https://www.linkedin.com/in/rajanmaharjan’ target=’_blank’ rel=’noopener’><img alt=’linked icon’ style=’border:0; height:25px; width:25px;’ src=’http://rajanmaharjan.com/icons/linkedin.png’ width=’15’ border=’0’></a></span></p></td>
<td valign=’top’ style=’padding-left:40px;’><p>Best regards/Sincerly Yours, </p></td>
</tr>
<tr>
<td valign=’top’ style=’padding-left:40px;’><span style=’font-size:18px;color:#509dc6;’><strong>$($sig.DisplayName)</strong></span><br />
<span style=’font-size:17px;color:#777777’>$($sig.position)</span><br />
<span style=’font-size:12px’>
$($sig.company)<br />
$($sig.Office) Address Goes Here, Nepal<br />
<img alt=’phone’ style=’border:0; height:12px; width:12px’ src=’http://rajanmaharjan.com/icons/phone.png’ width=’12’ height=’12’ border=’0’>&nbsp; +977 XX XXXXXX (Ext. XXX) +977 XX XXXXXX(Direct)<br />
<img alt=’mobile’ style=’border:0; height:12px; width:12px’ src=’http://rajanmaharjan.com/icons/email.png’ width=’12’ height=’12’ border=’0’> $($.sig.PrimarySmtpAddress)<br />
<img alt=’mobile’ style=’border:0; height:12px; width:12px’ src=’http://rajanmaharjan.com/icons/website.png’ width=’12’ height=’12’ border=’0’>&nbsp; <a target=’_blank’ href=’http://rajanmaharjan.com/?utm_source=link&amp;utm_medium=signature’>http://rajanmaharjan.com</a></span>
<p style=’margin-top:20px; margin-bottom:0;’> <a href=’http://rajanmaharjan.com’ target=’_blank’ rel=’noopener’><img alt=’BANNER’ style=’max-width:330px; height:auto; border:0;’ src=’http://rajanmaharjan.com/images/8.png’ width=’330′ border=’0’></a>
</p>
</td>
</tr>
<tr><td colspan=’2’>
<table width=’100%’><tr>
<td valign=’top’ style=’background-color:#777777;’ width=’10%’>&nbsp;</td>
<td colspan=’2′ valign=’middle’ style=’background-color:#509dc6;color:#FFFFFF;height:25px;font-size:13px;’>SOLOGAN GOES HERE – Think before you print for safer & greener environment</td>
</tr> </table></td></tr>
</tbody>
</table></body></html>”

Write-host $sig.Alias ‘Signature Added’

Leave a Reply

Your email address will not be published. Required fields are marked *