Bulk Push Email Signature in Office 365 using powershell

YES!!! you can do manual task of adding email signature of users who are using Office 365 in BULK. The only restriction is you must have data in Active Directory (AD) Server and basic knowledge of powershell. However if you do not have the full/correct data in Active Directory you can at least push the template/theme of your organization to all the employee of your organization.

To push signature for individual employee /user

Set-MailboxMessageConfiguration -Identity rajan.maharjan  -DefaultFontName 'Arial' -AutoAddSignature $true -AutoAddSignatureOnReply $true -SignatureHtml "<br /><table border='0' cellspacing='3' cellpadding='3' style='font-family:arial;background:#09C;' width='100%'>
<tbody>
<tr>
<td valign='top' style='padding-left:40px;'>Sincerly Yours,</td>
</tr>
<tr>
<td valign='top' style='padding-left:40px;'><span style='font-size:18px;color:#eeeeee;'>Rajan Maharjan</span><br />
<span style='font-size:12px'>MY PERSONAL OFFICE<br />
Kathmandu, Nepal<br />
Tel: +977 11 4422337<br />
Mobile: +977 9841122334<br>
Fax: +977 11 4422337<br />
Web: <a target='_blank' href='https://rajanmaharjan.com.np/?utm_source=link&amp;utm_medium=signature'>https://rajanmaharjan.com.np</a></span></td>
</tr>
<tr>
<td colspan='2'>Your notes/slogan if any</td></tr>
</tbody>
</table>"

For bulk update using for loop
Steps:

  1. Design your Signature Template in HTML format with good inline CSS
  2. Get list of your email address or username (excluding domain) e.g: if you have your employee name as first.lastname@rajanmaharjan.com.np, you need to put first.lastname, in a csv file with header label “identity”
  3. Now open powershell and run the code below

CODE as below:

$import= import-csv -Path 'D:\test.csv' #location of CSV file
$import | ForEach-Object {
$sig = Get-Mailbox -Identity $_.identity
Set-MailboxMessageConfiguration -Identity $_.identity -DefaultFontName 'Arial' -AutoAddSignature $true -AutoAddSignatureOnReply $true -SignatureHtml "<br /><table border='0' cellspacing='3' cellpadding='3' style='font-family:arial;background:#09C;' width='100%'>
<tbody>
<tr>
<td valign='top' style='padding-left:40px;'>Sincerly Yours,</td>
</tr>
<tr>
<td valign='top' style='padding-left:40px;'><span style='font-size:18px;color:#eeeeee;'>$($sig.DisplayName)</span><br />
<span style='font-size:12px'>$($sig.Office)<br />
Kathmandu, Nepal<br />
Tel: +977 11 4422337<br />
Mobile: +977 9841122334<br>
Fax: +977 11 4422337<br>
Email: <a href="mailto:$($sig.UserPrincipalName)">$($sig.UserPrincipalName)</a> <br />
Web: <a target='_blank' href='https://rajanmaharjan.com.np/?utm_source=link&amp;utm_medium=signature'>https://rajanmaharjan.com.np</a></span></td>
</tr>
<tr>
<td colspan='2'>Your notes/slogan if any</td></tr>
</tbody>
</table>"
Write-host 'Signature of ' $_.identity ' has been pushed.'
}

Leave a Reply

Close Menu