Removing OWA Signature for Multiple Users with PowerShell

In this post, we will discuss removing email signatures in Outlook Web App for single and multiple users with PowerShell. We are moving to a signature management provider and need to remove email signatures from all Exchange online mailboxes in the organization. Let’s jump into it.

Install PowerShell Module

First, we will need to install the Exchange Online PowerShell v2 (EXO V2) module. Type the below into PowerShell.

Install-Module ExchangeOnline

Next, we need to connect to Exchange Online. Type the below command and login with an administrator account.

Connect-ExchangeOnline

Deleting Signature for Single User

Now that we are connected to Exchange Online, we can type to below command to see if the user has a signature.

Get-MailboxMessageConfiguration -Identity “user’s UPN or alias”

The fields we are looking for are:

SignatureHtml

SignatureText

SignatureTextOnMobile

To delete a user’s signature, type the command below. Leaving the empty quotations will erase any existing signature.

Set-MailboxMessageConfiguration -Identity “user’s UPN or alias” -SignatureHtml “” -SignatureText “” -SignatureTextOnMobile “”

You can also set the auto add signature false.

Set-MailboxMessageConfiguration -Identity “user’s UPN or alias” -AutoAddSignature $false -AutoAddSignatureOnReply $false

Deleting Signature for Multiple Users

You can use the below script to delete the signatures of a specific group in your organization

$groupmembers = Get-DistributionGroupMember “distro group name” -ResultSize unlimited;
$groupmembers | foreach { Set-MailboxMessageConfiguration -identity $_.alias -SignatureHtml “” -SignatureText “” -SignatureTextOnMobile “”}

To delete email signatures for all users

$mailboxes = Get-Mailbox -ResultSize unlimited
$mailboxes | foreach { Set-MailboxMessageConfiguration -identity $_.alias -SignatureHtml “” -signatureText “”}

Additionally, you have the option to disable automatic signatures

$mailboxes = Get-Mailbox -ResultSize unlimited;
$mailboxes | foreach { Set-MailboxMessageConfiguration -identity $_.alias -AutoAddSignature $false -AutoAddSignatureOnReply $false}

Leave a comment