Removing OWA signatures for multiple users

Scenario:

You need to remove OWA signatures for:

Solution:

You can remove multiple OWA signatures using Windows PowerShell commands, as summarized in the following sections.


Removing OWA signatures for all existing users

  1. Ensure that you are logged in as a user who is a direct member of the Organization Management and Domain Admin groups (Global Administrator in the case of Exchange Online).
  2. Connect to your Exchange Server:
    • For Exchange on-premises, simply run the Exchange Management Shell.
    • For Exchange Online (Office 365) or a remotely managed Exchange, make a connection using steps detailed here, then return to this section.
  3. Execute the following PowerShell cmdlet sets:

    $mailboxes = Get-Mailbox -ResultSize unlimited  
    $mailboxes | foreach { Set-MailboxMessageConfiguration -identity $_.alias -SignatureHtml "" }    
    Here, SignatureHtml should be replaced with SignatureText or SignatureTextOnMobile for other signature formats your users might have configured.

  4. If required, you can also disable the OWA signature auto adding feature without actually removing signatures (or you can combine the following command with the above to do both):

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

Removing OWA signatures for an individual user

  1. Ensure that you are logged in as a user who is a direct member of the Organization Management and Domain Admin groups (Global Administrator in the case of Exchange Online).
  2. Connect to your Exchange Server:

    • For Exchange on-premises, simply run the Exchange Management Shell.
    • For Exchange Online (Office 365) or a remotely managed Exchange, make a connection using steps detailed here, then return to this section.
  3. Depending on your operating system, run commands below.

    Exchange 2007

    Execute the following PowerShell command:
    Set-CASMailbox -Identity <username> -OWASignaturesEnabled $false    
    Where <username> is replaced with the username for whom you wish to disable OWA signatures.

    Exchange 2010, Exchange 2013 or Exchange 2016

    Execute the following PowerShell commands to create a new OWA mailbox policy and then apply that policy to the required user:
    New-OwaMailboxPolicy -Name NoSig
    Set-OwaMailboxPolicy -identity nosig -SignaturesEnabled $false
    Set-CASMailbox -Identity <username> -OwaMailboxPolicy nosig    
    Where:
    • <username> is replaced with the username for whom you wish to disable OWA signatures.
    • NoSig is the name of the OWA mailbox policy that we are creating.

    Having run this once, you can then run the final command for any other required users:
    Set-CASMailbox -Identity <username> -OwaMailboxPolicy nosig    

How to set up remote session to Exchange Server using PowerShell

If you use Exchange Online (Office 365) or a remotely managed exchange (Exchange Server 2010 or 2013), you need to set up a remote session to access the Exchange server. To do this, follow the steps below:


  1. Check system requirements for your operating system:
  2. Run Windows Powershell.
  3. Use the command below to check your execution policy settings:

    Get-ExecutionPolicy    
    Here, SignatureHtml should be replaced with SignatureText or SignatureTextOnMobile for other signature formats your users might have configured.

  4. If the execution policy is set to Restricted, change it to RemoteSigned or Unrestricted using the command below:

    Set-ExecutionPolicy RemoteSigned    
  5. Provide target server administrator credentials using the command below:

    $LiveCred = Get-Credential    
  6. Configure the connection using the relevant command below:
    • To connect to Exchange Server 2010 or 2013:

      $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://<target-server-address>/powershell/ -Credential $LiveCred        
    • To connect to Exchange Online (Office 365):

      $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection        
  7. Start the connection using the command below:

    Import-PSSession $Session    
  8. When you have finished working and are ready to disconnect, use the command below:

    Remove-PSSession $Session