Exchange 2010 FWD Mail to Contact then Delete Mailbox

OK sold off a piece of company and need to get rid of 300 mailboxes.  These guys have moved to office 365.  I currently have their mailboxes forwarding to a Mail Contact with the Office 365 account on the mail contact as External Address.  The mail is forwarding as it should just fine.

 I want to DELETE the mailboxes from my Exchange.  If just delete the mailbox and add it as an SMTP address in the mail contact then I get an NDR when sending to the address.

What step am I missing?  I thought it was a server side rule I needed to create to hold the FWd even without an actual mailbox.  I tried using the following command but it says the address doesnt exist

New-InBoxRule -Mailbox "bob smith" -Name "Forward to partner" -ExceptIfHasAttachment $false   -DeleteMessage $true -ForwardTo

The specified user "" wasn't found or is invalid. Please make sure you have type
d the name correctly.
    + CategoryInfo          : InvalidArgument: (:) [New-InboxRule], LocalizedException
    + FullyQualifiedErrorId : 5FF75595,Microsoft.Exchange.Management.RecipientTasks.NewInboxRule
Who is Participating?
Jeffery HayesConnect With a Mentor System Support Technician Commented:
Can you send me the complete Non Delivery Report or upload it when you try to select the contact from the GAL?

What you have listed should work, with the exception of any inbox rule. As that would require the mailboxes to be active.

set-mailcontact <Display Name> -emailaddresses SMTP:<Internal Recipient Email Address>, <External Recipient Email Address>
Jeffery HayesSystem Support Technician Commented:
Your going to have to keep the mailboxes and setup mail fowarding is the easiest method.

Set-Mailbox -Identity "Dan Park" -ForwardingAddress "" -DeliverToMailboxAndForward $false

This would keep them as mailboxes and forward all mail to the new address and not save any mail to the old mailbox that is sent from when mail forwarding is enabled.

Or you can enable a mailuser contact to forward to.

I wouldn't go about deleting every single mailbox but rather setting them as mailusers for the recipient type.

I would go with Disable-Mailbox for the users that away the AD Object still exist.
Simon Butler (Sembee)ConsultantCommented:
What you have done is correct, but I expect it is Autocomplete getting in the way.
What you need to do is add the X500 address to the contact. That way auto complete entries internally will get to the contact.

Also don't discount the delay in removing a mailbox and the OAB being updated. When you enter an SMTP address, the first Outlook does is see if it resolves to an entry in the GAL. If it does, then it is "corrected" to use that instead of the SMTP address. As it can take up to 48 hours for the GAL to be seen on all clients (OAB regeneration and then Outlook updating) it is probably best to do it on a Friday afternoon/evening.

Twhite0909Author Commented:
What I had was correct some of the names and emails in Ad were different from each other.  Thanks guys!
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.