Re: VBScript Create Mailbox for User and email address
- From: Yas <yasar1@xxxxxxxxx>
- Date: Sat, 25 Aug 2007 08:06:03 -0700
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
.
- References:
- VBScript Create Mailbox for User and email address
- From: Yas
- Re: VBScript Create Mailbox for User and email address
- From: Yas
- Re: VBScript Create Mailbox for User and email address
- From: Wayne Tilton
- VBScript Create Mailbox for User and email address
- Prev by Date: Re: Destroying Objects in VBScript
- Next by Date: Re: find duplicates
- Previous by thread: Re: VBScript Create Mailbox for User and email address
- Next by thread: script to monitor dir and mail
- Index(es):
Relevant Pages
|