creating mail user without a mailbox exchange 2007

0

I'm trying to script out new user accounts and am having issues creating a mail user in exchange 2007.

We are migrating to zimbra for our e-mails, so i'm not looking to create a mailbox, but a mail-user (in the mail contact section of the exchange console) to direct mail to the new server. The users AD account has already been created.

I'm using the powershell command:

Enable-MailUser -Identity 'domain\username' -Alias 'username' -ExternalEmailAddress 'SMTP:username@zimbra.domain.local'

When I run the command it creates a 'legacy mailbox' in the mailbox section instead of the expected 'mail user' in the mail contact section.

However, if I disable the legacy mailbox (just by right clicking and choosing disable) and re-run the same command, it creates the mail user as expected.

Does anyone know how I'm able to create a mail user in the mail contact section first off?

I've experimented with creating mail-contacts, but that also creates a duplicate entry in AD. Something that may confuse the helpdesk.

Hope I explained the above ok. Can clarify if needed.

Thanks.

Andrew

Posted 2014-06-17T05:03:08.383

Reputation: 45

Answers

0

Try the New-MailUser cmdlet instead...

New-MailUser -Name Ted -FirstName Ted -LastName Bremer
-ExternalEmailAddress ted@tailspintoys.com -UserPrincipalName ted@contoso.com -OrganizationalUnit contoso.com

Fingers crossed, this will give the oputcome you desire. If my memory serves correctly, the Enable-Mail User attempts to create a mailbox for an existing AD user (which in this case doesn't exist). In the second attempt, there is an object to work with, so things go ok.

Hope this helps

Fazer87

Posted 2014-06-17T05:03:08.383

Reputation: 11 177

The users AD accounts are already created before I run the enable-mailuser command, so nothing new is created that I know of. I've found the issue now though. – Andrew – 2014-06-17T23:17:21.303

0

Found the issue - it seems when the AD users were created, they were copied from existing users and it seems exchange attributes were copied with them.

If I created a user from scratch and run Enable-MailUser, it works as expected.

Andrew

Posted 2014-06-17T05:03:08.383

Reputation: 45