top of page

How to add a Trusted Sender for Automatic Image Download in Outlook for All Users with PowerShell


Email communication is essential for organizations, and ensuring that images in emails from trusted senders are displayed automatically can enhance the user experience. This is especially relevant for emails sent via third-party marketing services on behalf of an organization. However, by default, Outlook blocks images in emails to protect users from potentially harmful content.





In this blog post, we'll guide you through using PowerShell to configure Exchange Online (it's very similar for Exchange 2013+) environments to automatically download images from trusted senders globally, across all users, in your organization. This solution involves whitelisting a sender or domain, ensuring that emails from these sources are not flagged as spam and that images are displayed by default.


Why Use PowerShell for This Configuration?

PowerShell provides a robust and efficient way to manage settings across all mailboxes in an Exchange environment. By using PowerShell commands, administrators can easily update policies and configurations, ensuring consistent settings for all users. This is particularly useful for large organizations where manual configuration would be impractical.


Steps to Install and Launch Exchange Online PowerShell


Before proceeding with the PowerShell command to whitelist a sender, you need to set up Exchange Online PowerShell.


Here’s how when working with Exchange Online (Microsoft 365 | admin.exchange.com)


1. Install the Exchange Online PowerShell Module


To interact with Exchange Online, you need to install the module on your local machine.

Install-Module -Name ExchangeOnlineManagement

2. Connect to Exchange Online


Once the module is installed, you can connect to Exchange Online using the following command. Replace username@domain.com with your admin email address.

Connect-ExchangeOnline -UserPrincipalName username@domain.com

Follow the prompts to authenticate. Ensure you have the necessary Exchange Server admin permissions.


3. Run PowerShell Commands


After connecting, you can run the necessary PowerShell commands to configure mailbox settings.


Whitelisting a Sender for Automatic Image Download


To allow images from a specific domain to download automatically, you can use the Set-MailboxJunkEmailConfiguration cmdlet. This example whitelists the domain contoso.com for all user mailboxes, ensuring that emails from this domain are trusted and that images load automatically.


PowerShell Command to Whitelist a Sender

Get-Mailbox -ResultSize unlimited -RecipientTypeDetails UserMailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains @{Add="contoso.com"} -ErrorAction SilentlyContinue

Command Breakdown:


  • Get-Mailbox -ResultSize unlimited -RecipientTypeDetails UserMailbox: Retrieves all user mailboxes in the organization.

  • Set-MailboxJunkEmailConfiguration: Configures the junk email settings for these mailboxes.

  • -TrustedSendersAndDomains @{Add="contoso.com"}: Adds contoso.com to the list of trusted senders and domains.

  • -ErrorAction SilentlyContinue: Ensures that the script continues to run even if an error occurs, useful in large deployments.


Conclusion





By following these steps, you can ensure that images from trusted domains are displayed automatically in Outlook for all users in your organization. This process not only improves the user experience but also helps maintain a professional appearance for emails sent on behalf of your organization.



Comentários

Avaliado com 0 de 5 estrelas.
Ainda sem avaliações

Adicione uma avaliação

Get in touch

Keep up to date

Never miss an update

Thanks for submitting!

bottom of page