Discussion:
setting 'ExternalEmailAddress'
(too old to reply)
HankC
2012-01-19 20:00:22 UTC
Permalink
I have a vbscript creating user accounts. It's pretty much:

Set oUser = oContainer.Create("user", "cn=" & my_name)
oUser.Put "userPrincipalName", my_name & "@college.edu"
oUser.Put "mailnickname", my_name
oUser.Put "sAMAccountName", my_name
oUser.SetInfo

then I shell to powershell (to create the mailbox in 2010) and call:

get-user my_name | enable-mailbox -database email01-db001

which throws the error:

WARNING: The object college.edu/Users/my_name has been corrupted, and
it's in an inconsistent state. The following validation errors
happened:
WARNING: ExternalEmailAddress is mandatory on MailUser.
WARNING: The mail contact and mail user must have a valid external e-
mail address.


I'm confused about how to assign 'ExternalEmailAddress'. The object is
a not mail-enabled until touched by the enable-mailbox cmdlet. can i
set the 'ExternalEmailAddress' prior to creating the mailbox?





HankC
MichaelV
2015-11-04 08:07:50 UTC
Permalink
Post by HankC
Set oUser = oContainer.Create("user", "cn=" & my_name)
oUser.Put "mailnickname", my_name
oUser.Put "sAMAccountName", my_name
oUser.SetInfo
get-user my_name | enable-mailbox -database email01-db001
WARNING: The object college.edu/Users/my_name has been corrupted, and
it's in an inconsistent state. The following validation errors
WARNING: ExternalEmailAddress is mandatory on MailUser.
WARNING: The mail contact and mail user must have a valid external e-
mail address.
I'm confused about how to assign 'ExternalEmailAddress'. The object is
a not mail-enabled until touched by the enable-mailbox cmdlet. can i
set the 'ExternalEmailAddress' prior to creating the mailbox?
HankC
Thanks Hank, you pushed me into the right direction here.

I know this is probably too late. But for other like me searching for a solution to this issue.
The error is thrown because the Exchange alias/mailNickname is already set for this non-mail enabled account.
You can change the alias/mainNickname attribute after adding the mailbox.
Loading...