Re: VBScript Create Mailbox for User and email address

Tech-Archive recommends: Speed Up your PC by fixing your registry



On 24 Aug, 18:32, Wayne Tilton <Wayne_Til...@xxxxxxxxxxxxxxxx> wrote:
Yas<yas...@xxxxxxxxx> wrote in news:1187921115.821557.195110
@z24g2000prh.googlegroups.com:



On 24 Aug, 00:59,Yas<yas...@xxxxxxxxx> wrote:
Hello,

I'm getting very confused trying to create a mailbox in Exchange for a
new user with an email address. I have roughly the following code...

Set objMailbox = objUser
objMailbox.createMailBox exchURL
objUser.SetInfo

'objUser.mail = "james.watson.sm...@xxxxxxxxxxxx"

objUser.PutEx ADS_PROPERTY_APPEND, "proxyAddresses",
Array(james.watson.sm...@xxxxxxxxxxxx)
objUser.SetInfo
--------------------------------------------------
This does not work neither does objUser.mail =
"james.watson.sm...@xxxxxxxxxxxx".

I would like to have an email address that's different from
sAMAccountName and UPN but after creating the user I check AD and the
email is always sAMAccountN...@xxxxxxxxxxxxx

Everything else is fine, I just want to create the Primary email
address.

I've done some testing creating users by hand and it seems what I
really would like to be able to do is
create the mailbox Alias when creating the Mailbox. When I put in the
alias in AD when creating the account by hand it gives
me the exact result I want, it even sets the SMTP: email correctly.

So, can anyone please tell me how to specify the mailbox Alias when
creating the Mailbox with VBScript?

or is there another way through the script?

Many many thanks for any help or advise

Yas

My recommendation would be to let RUS do the heavy lifting. If you set
'mailNickname' (e.g. set it to the account's sAMAccountName) and homeMDB
(the full DN of the target mailbox store), RUS will detect that and do
the rest for you automatically (assuming you have RUS configured
appropriately).


Thanks! that did the trick.
Though if I set the mailNickname and that email address is already
taken exchange changes it by adding a
number after it...eg jim.west to jim.west2 etc
which is fine.

However, is there a way I can get the actual user's email address that
is set
by mailbox creation printed to screen?

I have...

objUser.mailNickname = "jim.west"
objUser.SetInfo

Set objMailbox = objUser
objMailbox.createMailBox exchURL
objUser.SetInfo

I would like to return the actual mail address here..

objUser.mailAddress and objUser.mail returns empty even though when I
check in AD the user has the email set correctly.


Thank you! :-)

Yas

.



Relevant Pages

  • Re: VBScript Create Mailbox for User and email address
    ... create the mailbox Alias when creating the Mailbox. ... My recommendation would be to let RUS do the heavy lifting. ... 'mailNickname' (e.g. set it to the account's sAMAccountName) and homeMDB ...
    (microsoft.public.scripting.vbscript)
  • Re: AD Users & Computers stopped creating mailboxes for new users
    ... There is something up with the RUS and there has to be a reason as to why it ... So your Exchange server is a DC/GC? ... There are 4 entries beginning MSExchPolicies ... >mailbox does not show up in System Manager. ...
    (microsoft.public.exchange2000.active.directory.integration)
  • Re: My E2K Isnt Creating Email Addresses
    ... Those are for the RUS. ... 297124 XADM: Recipient Update Service Does Not Stamp Users and No Error Is ... I am determining that I don't have a mailbox ...
    (microsoft.public.exchange2000.general)
  • Re: exchange mailboxes arnt appearing immeadiately
    ... I would look into where the Recipient Update Service (RUS) is pointing. ... RUS stamps user email addresses and until it stamps a user, ... When I add a new user with a mailbox onto my exchange server their mailbox ... domain and then added another win2k3 Exchange 2003 member server. ...
    (microsoft.public.exchange.misc)
  • Re: Cant create mailboxes
    ... This means that the RUS has not stamped the user with its proxy addresses. ... Please do not send e-mail directly to this alias. ... >>When you say that it isn't creating the mailbox how do ... >>Microsoft Exchange Support ...
    (microsoft.public.exchange.admin)