M365 Exchange online how to find users with auto-forwarding enabled

 M365 Exchange online how to find users with auto-forwarding enabled

 

1. Use Powershell
 
 
Connect-ExchangeOnline

 Get-Mailbox | Where {$null -ne $_.ForwardingSmtpAddress} | FT UserPrincipalName,ForwardingSmtpAddress,DeliverToMailboxAndForward

$Mailboxes = Get-Mailbox -ResultSize unlimited  | where {$_.RecipientTypeDetails -eq "UserMailbox"}


foreach ($Mailbox in $Mailboxes)
    {
Get-InboxRule -mailbox $Mailbox.Name | Where-object {$_.forwardto -or $_.forwardasattachmentto} | fl mailboxownerid,name,description
} 

 

Comments

Popular posts from this blog

Securing the Pi-hole with fail2ban to prevent DNS Amplification attacks

Python pxssh failed on login. could not set shell prompt

Differences between gz, bzip2, xz, 7z, rar, lzop