Set Outlook Web App signature with image using PowerShell

Applies to Exchange 2016, Exchange 2013, Exchange 2010 and Exchange Online (Office 365).

In corporate environments central management of email signatures is a must – you don’t want users messing up the company’s image by sending out emails stamped with notes in Comic Sans, lacking crucial contact info, etc.

So it’s a good thing that Microsoft Exchange platforms offer several means of controlling the email footer situation in your network. The most popular one is the Apply disclaimers feature available via Exchange transport rules, which I’ve talked about extensively on this blog (see respective guides for Exchange Online, 2016, 2013, 2010 and 2007).

How to set Outlook Web App signature with image using PowerShell

Another way of deploying email signatures from one place across an Exchange organization, is using the Set-MailboxMessageConfiguration PowerShell cmdlet with the -SignatureHTML parameter.

This method allows you to populate the Email signature box in end-users’ Outlook Web App / Outlook on the Web clients with any type of HTML content: text, tables, images, links, etc.

Required permissions

To be able to centrally set users’ OWA email signatures you need to be assigned Server Management permissions. This can be done either via Exchange admin center or using PowerShell (learn more…).


  • First of all, you need to prepare the HTML code you will send out to OWA clients.

    Make sure to upload the images that you will use in the signature to a public web server, so that you can insert them into the code using <IMG SRC> tags.

    NOTE: There is no direct way of downloading users’ Active Directory data into the template, so the email signature design you will use, should only contain general company information, images and links.  You can find examples of business email signature designs in our Signature Template library.

    Pasting raw HTML into PowerShell is not advisable (if at all possible?), so once you have the HTML code, save it to a TXT file on your disk. I will explain how to feed it to PowerShell in a moment.

  • Another important thing is that you have PowerShell access to Exchange or Office 365. Unless you are working on a machine that has Exchange Management Shell installed on it, refer to the below article for details on what to do:

    How to start remote PowerShell session to Exchange or Office 365

Importing the HTML code into PowerShell

Before you can deploy the email signature to OWA clients, you have to import its code into a variable in PowerShell.

You do this by running the below command:

$<Name of variable> = Get-Content <Path of prepared TXT file>


$SignatureSocial = Get-Content C:\SignatureSocial.txt

Deploying the email signature to Outlook Web App clients

To deploy the imported email signature to users’ Outlook Web App clients and set it to automatically add to emails, you have to run the below command:

Get-Mailbox -RecipientTypeDetails UserMailbox | Set-MailboxMessageConfiguration -SignatureHTML $<Name of variable> -AutoAddSignature:$true

You can check if the setting has been applied correctly, by going to Outlook Web App Options, Mail, Layout, Email signature.

This is what it looked like when I deployed my example signature with images:

Outlook Web App, Options, Email Signature

NOTE: If you ever want to get rid of the email signature in users’ OWA clients, follow this article.

Related Software

CodeTwo Exchange Rules: Central management of email signatures for on-premises Exchange

CodeTwo Email Signatures for Office 365: Central management of email signatures in Office 365

CodeTwo Email Signatures for Email Clients: Design email signatures centrally and deploy to OWA, Outlook and Gmail

One thought on “Set Outlook Web App signature with image using PowerShell

Leave a Reply

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