Manage Email Junk Safe and Blocked senders for specific users.
connect to o365.
$UserCredential = Get-Credential
#connect to exchange 0365
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
get-mailboxjunkemailconfiguration -identity johndoe
Add domain and email to trusted senders list.
Get-Mailbox johndoe |Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains @{Add="random.com","jane@somedomain.com"}
Remove domain and email from trusted senders list.
Set-MailboxJunkEmailConfiguration -Identity johndoe -TrustedSendersAndDomains @{Remove="<domain name>","<E-mail address>"}
Comments
Post a Comment