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
Post a Comment