HankC
2012-01-19 20:00:22 UTC
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
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