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
And also the command to remove the email forwarding?
Regards
DNRRP
ASKER
I just need standard Exchange Powershell commands to forward emails to another user.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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).Wi ndowsEmail Address}
$fwds
and remove the the email forwarding:
Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Set-Mailbox -ForwardingAddress $null -DeliverToMailboxAndForwar d $false
Hope it helps.
$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).Wi
$fwds
and remove the the email forwarding:
Get-Mailbox | Where {$_.ForwardingAddress -ne $null} | Set-Mailbox -ForwardingAddress $null -DeliverToMailboxAndForwar
Hope it helps.
ASKER
Abhilash Hb
So to forward emails from JBloggs1 to JBloggs2 to would look like the command below ?
Set-Mailbox user "JBloggs1" -DeliverToMailboxAndForwar d $true -JBloggs2@email.com
So to forward emails from JBloggs1 to JBloggs2 to would look like the command below ?
Set-Mailbox user "JBloggs1" -DeliverToMailboxAndForwar
ASKER
allen_rich
So to forward emails from JBloggs1 to JBloggs2 what would be the exact Powershell Command be ?
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
get-mailbox -Filter { ForwardingAddress -like '*' } | select-object Name,ForwardingAddress |fl >out.txt
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
Accepted answer: 0 points for DNRRP's comment #a39865835
for the following reason:
Resolved
http://jeffnaperski.com/exchangepowershell-forwardingremoving-email-and-distribution-groups-script/