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
userA, userA@test.com
userB, userB@test.com
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}
}
This comment has been removed by the author.
ReplyDeleteHere's a script should it do it too; have a csv file contains email and Identity;
ReplyDelete$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"}
}