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

Reduce (shrink) and resize raw disk at Proxmox

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

How to clean DB from old logs in Magento 1.x