I am scripting user/mailbox creation.

All goes well until trying to add additional SMTP address by manipulating
the property, proxyAddresses.

Problem does not appear to be in the code, but the fact that after creating
the mailbox there is a delay until the base email addresses are created by
the Exchange Recipient Policies. That is triggered by the creation of the
mailbox, or the assignment of the mailbox properties.

The error I get when attempting to access the objUser.proxyAddresses is "the
object is not a collection." This is true until the email addresses are
actually generated.

If I pause the script with a breakpoint, after creating the mailbox, but
before attempting to read the proxyAddresses, and then open up ADUC to view
the user's properties on the Exchange Email Addresses tab, there is no data
in the GUI either. After a pause, varying from several seconds to 2
minutes, the addresses appear. At that point, I can resume the script and
it reads the proxyAddresses value with no problem. I assume from this that
the script code is OK, even though it doesn't work.

What I need is a way to force the email address generation (I think).

--
Trey Shaffer
Trey@Shaffer-Family.com