Link to home
Start Free TrialLog in
Avatar of DNRRP
DNRRP

asked on

Exchange 2010

What is the exact Exchange powershell command to forward "Joe.Bloggs" emails to "Joe.Bloggs2" ?
And also the command to remove the email forwarding?

Regards
DNRRP
Avatar of Abhilash
Abhilash

Avatar of DNRRP

ASKER

I just need standard Exchange Powershell commands to forward emails to another user.
ASKER CERTIFIED SOLUTION
Avatar of Abhilash
Abhilash

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try this for to forwarding emails to another user

$fwds = get-mailbox | Where-Object { $_.ForwardingAddress -ne $null } | select Name, ForwardingAddress
foreach ($fwd in $fwds) {$fwd | add-member -membertype noteproperty -name “ContactAddress” -value (get-contact $fwd.ForwardingAddress).WindowsEmailAddress}
$fwds

and remove the the email forwarding:

Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Set-Mailbox -ForwardingAddress $null -DeliverToMailboxAndForward $false

Hope it helps.
Avatar of DNRRP

ASKER

Abhilash Hb

So to forward emails from JBloggs1 to JBloggs2 to would look like the command below ?
 

Set-Mailbox  user "JBloggs1" -DeliverToMailboxAndForward $true -JBloggs2@email.com
Avatar of DNRRP

ASKER

allen_rich


So to forward emails from JBloggs1 to JBloggs2 what would be the exact Powershell Command be ?
Try this command line:

get-mailbox -Filter { ForwardingAddress -like '*' } | select-object Name,ForwardingAddress |fl >out.txt
Avatar of DNRRP

ASKER

I've requested that this question be closed as follows:

Accepted answer: 0 points for DNRRP's comment #a39865835

for the following reason:

Resolved