powershell

Adding domains to your Safe Senders List Exchange Online “JunkMail”

Connection powershell

1-) $LiveCred = Get-Credential
2-) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
3-) Import-PSSession $Session
4-) Connect-MsolService

 

Get-Mailbox | Set-MailboxJunkEmailConfiguration -TrustedSendersAndDomains contoso.com, xpto.com

Deleting User deleted Exchange Online

 

Connection for powershell

1-) $LiveCred = Get-Credential
2-) $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
3-) Import-PSSession $Session
4-) Connect-MsolService

 

After

Get-MsolUser -ReturnDeletedUsers | Remove-MsolUser -RemoveFromRecycleBin -force