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
DNRRPAsked:
Who is Participating?
 
AbhilashBloggerCommented:
Then it would be this
Set-Mailbox  user -DeliverToMailboxAndForward $true -ForwardingAddress mail@email.com
0
 
DNRRPAuthor Commented:
I just need standard Exchange Powershell commands to forward emails to another user.
0
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

 
allen_richCommented:
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.
0
 
DNRRPAuthor Commented:
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
0
 
DNRRPAuthor Commented:
allen_rich


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

get-mailbox -Filter { ForwardingAddress -like '*' } | select-object Name,ForwardingAddress |fl >out.txt
0
 
DNRRPAuthor Commented:
I've requested that this question be closed as follows:

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

for the following reason:

Resolved
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.