Thursday, 20 November 2014

ADDING EMAIL ADDRESSES TO SAFE SENDERS LIST FOR ALL USERS OFFICE 365

1. Connect Windows PowerShell to Exchange Online http://technet.microsoft.com/en-us/library/jj984289(v=exchg.150).aspx
2. Prepare a CSV file to list the users whom you want to change, and this file maybe  contain the user's alias and email address in your organization , and then store it in local disk (for example, F:\UserList.csv ).
For example:
Identity, EmailAddress
3. Run the command below to bulk update the safer sender list of all users of your organization:
Import-Csv "F:\UserList.csv"  | foreach { Set-MailboxJunkEmailConfiguration -Identity  $_.Identity -TrustedSendersAndDomains  @{Add=news@domain.com} }

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Here's a script should it do it too; have a csv file contains email and Identity;

    $MBX = Import-CSV -Path "C:\Scripts\AllMUBMailboxs.csv"

    ForEach($User in $MBX)
    {
    $User.Identity


    Set-MailboxJunkEmailConfiguration -Identity $user.Identity -TrustedSendersAndDomains @{Add="*@domain.com", "*@domain.com"}

    }

    ReplyDelete