In order to load the images, you must execute the commands below in Windows 10 PowerShell. You have to run PowerShell as an administrator.
Please run each command one by one. You will need access to the administrator credentials for your Microsoft Office account.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser Install-Module -Name ExchangeOnlineManagement Import-Module ExchangeOnlineManagement Connect-ExchangeOnline Get-Mailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains @{Add="securityawareness.pro", "nospamplus.com", "inbox-guardian.com", "mail-defender.com", "proxysecurefilter.com", "onemailfilter.com", "notificationspace.com", "mailsmtpfilter.com", "gmailgateway.com", "forwardfrom.com", "outlookgateway.com", "smtpemaillist.com", "spamshieldplus.com", "attacksimulator.com"}
For some configurations, we have noticed that the above commands may give the following error:
ConvertTo-HashTable : Exception calling "Add" with "2" argument(s): "Item has already been added. Key in dictionary: '@odata.type' Key being added: '@odata.type'".
If you have this problem, please download the script attached in this post and run it in PowerShell as an administrator. The commands to run it are:
cd PATH_TO_FILE ./officeimages.ps1
Please replace the PATH_TO_FILE variable with the real location where you downloaded the officeimages.ps1 file.
This script is much slower than the above version. So please try to use it only if other variants don't work.
Validation
Run the following commands to check a random email address from your company.
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser Install-Module -Name ExchangeOnlineManagement Import-Module ExchangeOnlineManagement Connect-ExchangeOnline (Get-MailboxJunkEmailConfiguration -Identity “myemail@example.com”).TrustedSendersAndDomains
Check that our domains appear in the result list.
Exchange Server (On Premise)
If you're using Exchange Server (On premise), open the Exchange Management Shell and run the following command.
Validation
Run the following command in Exchange Management Shell to check a random email address from your company.
Check that our domains appear in the result list.