# Get All User Who has forwarder set
Get-mailbox -ResultSize unlimited | select DisplayName,ForwardingAddress | where {$_.ForwardingAddress -ne $Null} | out-file C:\Scripts\Output\UsersWithMailforwarders.txt





<#

Forward mails to another mailbox:

Set-Mailbox user@domain.com -ForwardingAddress dest_mailbox@domain.com

Forward mailbox without saving a local copy:

Set-Mailbox user@domain.com -ForwardingAddress dest_mailbox@domain.com -DeliverToMailboxAndForward $false

Forwarding mails to another external mailbox:

Set-Mailbox user@domain.com -ForwardingSmtpAddress ext_mailbox@domain.com

Forwarding mails to another external mailbox without saving a local copy:

Set-Mailbox user@domain.com -ForwardingSmtpAddress ext_mailbox@domain.com -DeliverToMailboxAndForward $false

Apply the forwarding to users in mass:

Get-Mailbox | Where {$_.RecipientType -eq “UserMailbox”} | Set-Mailbox -ForwardingAddress dest_mailbox@domain.com

Apply the forwarding to users to be sent to external users in mass:

Get-Mailbox | Where {$_.RecipientType -eq “UserMailbox”} | Set-Mailbox -ForwardingSmtpAddress ext_mailbox@domain.com

Get forwarding Info of a user:

Get-Mailbox -Identity user@domain.com | fl DeliverToMailboxAndForward, ForwardingAddress, ForwardingSmtpAddress

Remove mail forwarding:

Set-Mailbox user@domain.com -ForwardingAddress $null

Remove mail forwarding sent to an external user:

Set-Mailbox user@domain.com -ForwardingSmtpAddress $null

Remove mail forwarding to users in mass:

Get-Mailbox | Where {$_.RecipientType -eq “UserMailbox”} | Set-Mailbox -ForwardingAddress $null

Remove mail forwarding sent to external users to users in mass:

Get-Mailbox | Where {$_.RecipientType -eq “UserMailbox”} | Set-Mailbox -ForwardingSmtpAddress $null

#>


# Good To Go







