Home All Groups Group Topic Archive Search About
Author
2 May 2009 12:57 AM
yekolo

Hi All,

I am trying to create an exchange mailbox from active directory by adding
the following attributes in AD user profile.

homeMDB, legacyExchangeDN, mail,mailNickname, mDBUseDefaults,
msExchHomeServerName,proxyAddresses,targetAddress
and,msExchMailboxGuid

This approach works. However,  I had to pre-generate the msExchMailboxGuid 
using the microsoft Exchange Mailbox Guid generator.  However, I need to
create hundereds of mailboxes and I would like to know if there is anyway to
force exchange to generate the GUID number automatically even if I am
creating the mailboxes via AD.
If that is not possible, is there a way to auto-generate the GUID number via
some library call on the fly [from perl preferably].

I am new to exchange and would love to know if this is even the right
approach.
Please understand, the mailboxes are managed based on flags created on an
external data sources and I am sort of forced to do this project using a perl
script (Net::LDAP)

I look forward to hear your solutions.

Author
4 May 2009 3:45 PM
kelly
I am not sure I understand completely.

If your process works as far as exchange is concerned, then sending an
email to the mailbox or the user logging in should create the mailbox
for you(with a GUID).

Kelly


yekolo wrote:
Show quoteHide quote
> Hi All,
>
> I am trying to create an exchange mailbox from active directory by adding
> the following attributes in AD user profile.
>
> homeMDB, legacyExchangeDN, mail,mailNickname, mDBUseDefaults,
> msExchHomeServerName,proxyAddresses,targetAddress
> and,msExchMailboxGuid
>
> This approach works. However,  I had to pre-generate the msExchMailboxGuid 
> using the microsoft Exchange Mailbox Guid generator.  However, I need to
> create hundereds of mailboxes and I would like to know if there is anyway to
> force exchange to generate the GUID number automatically even if I am
> creating the mailboxes via AD.
> If that is not possible, is there a way to auto-generate the GUID number via
> some library call on the fly [from perl preferably].
>
> I am new to exchange and would love to know if this is even the right
> approach.
> Please understand, the mailboxes are managed based on flags created on an
> external data sources and I am sort of forced to do this project using a perl
> script (Net::LDAP)
>
> I look forward to hear your solutions.
>
>
>
>
Are all your drivers up to date? click for free checkup

Author
4 May 2009 4:24 PM
yekolo
Thanks Kelly for replying.

I am not sure what you mean by sending email to the mailbox should create
the mailbox. Please elaborate.

What I am trying to do is, instead of going through the Exchange management
console etc, I am directly updating AD profile [via LDAP protocole] for the
user with the attributes listed below. [This seems to be what exchange does
when you create a mailbox via the exchange management console.]

I guess my question is,
1. Can you populate an AD profile with the exchange attributes to create an
exchange mailbox?
2. What are the required attributes needed? (from my experiments, populating
the attributes I listed below seems to work).
3. I do not know how to generate the GUID number automatically, so is there
anyway exxchange itself can create the GUID number once it notices the
homeMDB etc attributes are populated?


Regards,
yekolo




Show quoteHide quote
"kelly" wrote:

> I am not sure I understand completely.
>
> If your process works as far as exchange is concerned, then sending an
> email to the mailbox or the user logging in should create the mailbox
> for you(with a GUID).
>
> Kelly
>
>
> yekolo wrote:
> > Hi All,
> >
> > I am trying to create an exchange mailbox from active directory by adding
> > the following attributes in AD user profile.
> >
> > homeMDB, legacyExchangeDN, mail,mailNickname, mDBUseDefaults,
> > msExchHomeServerName,proxyAddresses,targetAddress
> > and,msExchMailboxGuid
> >
> > This approach works. However,  I had to pre-generate the msExchMailboxGuid 
> > using the microsoft Exchange Mailbox Guid generator.  However, I need to
> > create hundereds of mailboxes and I would like to know if there is anyway to
> > force exchange to generate the GUID number automatically even if I am
> > creating the mailboxes via AD.
> > If that is not possible, is there a way to auto-generate the GUID number via
> > some library call on the fly [from perl preferably].
> >
> > I am new to exchange and would love to know if this is even the right
> > approach.
> > Please understand, the mailboxes are managed based on flags created on an
> > external data sources and I am sort of forced to do this project using a perl
> > script (Net::LDAP)
> >
> > I look forward to hear your solutions.
> >
> >
> >
> >
>
Author
4 May 2009 4:32 PM
kelly
I don't know if your #1 will work. To test it out, I would do as you
have done except I would leave off the msExchMailboxGuid.  Then I would
a. try sending an email to that user or b. login to exchange as that
user to see if the mailbox was created automatically.

I have code which creates the mailboxes but it only seems to set the
attributes until it receives an email or the user logs in, then the
mailbox is created.

Hope that helps.

Kelly

yekolo wrote:
Show quoteHide quote
> Thanks Kelly for replying.
>
> I am not sure what you mean by sending email to the mailbox should create
> the mailbox. Please elaborate.
>
> What I am trying to do is, instead of going through the Exchange management
> console etc, I am directly updating AD profile [via LDAP protocole] for the
> user with the attributes listed below. [This seems to be what exchange does
> when you create a mailbox via the exchange management console.]
>
> I guess my question is,
> 1. Can you populate an AD profile with the exchange attributes to create an
> exchange mailbox?
> 2. What are the required attributes needed? (from my experiments, populating
> the attributes I listed below seems to work).
> 3. I do not know how to generate the GUID number automatically, so is there
> anyway exxchange itself can create the GUID number once it notices the
> homeMDB etc attributes are populated?
>
>
> Regards,
> yekolo
>
>
>
>
> "kelly" wrote:
>
>> I am not sure I understand completely.
>>
>> If your process works as far as exchange is concerned, then sending an
>> email to the mailbox or the user logging in should create the mailbox
>> for you(with a GUID).
>>
>> Kelly
>>
>>
>> yekolo wrote:
>>> Hi All,
>>>
>>> I am trying to create an exchange mailbox from active directory by adding
>>> the following attributes in AD user profile.
>>>
>>> homeMDB, legacyExchangeDN, mail,mailNickname, mDBUseDefaults,
>>> msExchHomeServerName,proxyAddresses,targetAddress
>>> and,msExchMailboxGuid
>>>
>>> This approach works. However,  I had to pre-generate the msExchMailboxGuid 
>>> using the microsoft Exchange Mailbox Guid generator.  However, I need to
>>> create hundereds of mailboxes and I would like to know if there is anyway to
>>> force exchange to generate the GUID number automatically even if I am
>>> creating the mailboxes via AD.
>>> If that is not possible, is there a way to auto-generate the GUID number via
>>> some library call on the fly [from perl preferably].
>>>
>>> I am new to exchange and would love to know if this is even the right
>>> approach.
>>> Please understand, the mailboxes are managed based on flags created on an
>>> external data sources and I am sort of forced to do this project using a perl
>>> script (Net::LDAP)
>>>
>>> I look forward to hear your solutions.
>>>
>>>
>>>
>>>
Author
4 May 2009 6:44 PM
yekolo
Do you mind sending me the snippet of code that updates AD?
Regards,


Show quoteHide quote
"kelly" wrote:

> I don't know if your #1 will work. To test it out, I would do as you
> have done except I would leave off the msExchMailboxGuid.  Then I would
> a. try sending an email to that user or b. login to exchange as that
> user to see if the mailbox was created automatically.
>
> I have code which creates the mailboxes but it only seems to set the
> attributes until it receives an email or the user logs in, then the
> mailbox is created.
>
> Hope that helps.
>
> Kelly
>
> yekolo wrote:
> > Thanks Kelly for replying.
> >
> > I am not sure what you mean by sending email to the mailbox should create
> > the mailbox. Please elaborate.
> >
> > What I am trying to do is, instead of going through the Exchange management
> > console etc, I am directly updating AD profile [via LDAP protocole] for the
> > user with the attributes listed below. [This seems to be what exchange does
> > when you create a mailbox via the exchange management console.]
> >
> > I guess my question is,
> > 1. Can you populate an AD profile with the exchange attributes to create an
> > exchange mailbox?
> > 2. What are the required attributes needed? (from my experiments, populating
> > the attributes I listed below seems to work).
> > 3. I do not know how to generate the GUID number automatically, so is there
> > anyway exxchange itself can create the GUID number once it notices the
> > homeMDB etc attributes are populated?
> >
> >
> > Regards,
> > yekolo
> >
> >
> >
> >
> > "kelly" wrote:
> >
> >> I am not sure I understand completely.
> >>
> >> If your process works as far as exchange is concerned, then sending an
> >> email to the mailbox or the user logging in should create the mailbox
> >> for you(with a GUID).
> >>
> >> Kelly
> >>
> >>
> >> yekolo wrote:
> >>> Hi All,
> >>>
> >>> I am trying to create an exchange mailbox from active directory by adding
> >>> the following attributes in AD user profile.
> >>>
> >>> homeMDB, legacyExchangeDN, mail,mailNickname, mDBUseDefaults,
> >>> msExchHomeServerName,proxyAddresses,targetAddress
> >>> and,msExchMailboxGuid
> >>>
> >>> This approach works. However,  I had to pre-generate the msExchMailboxGuid 
> >>> using the microsoft Exchange Mailbox Guid generator.  However, I need to
> >>> create hundereds of mailboxes and I would like to know if there is anyway to
> >>> force exchange to generate the GUID number automatically even if I am
> >>> creating the mailboxes via AD.
> >>> If that is not possible, is there a way to auto-generate the GUID number via
> >>> some library call on the fly [from perl preferably].
> >>>
> >>> I am new to exchange and would love to know if this is even the right
> >>> approach.
> >>> Please understand, the mailboxes are managed based on flags created on an
> >>> external data sources and I am sort of forced to do this project using a perl
> >>> script (Net::LDAP)
> >>>
> >>> I look forward to hear your solutions.
> >>>
> >>>
> >>>
> >>>
>
Author
5 May 2009 10:18 AM
Oliver Moazzezi [MVP]
Hi there,

I presume you are using Exchange 2007 as you mention the Exchange Management
Console.

I wouldn't personally use AD manipulation via LDAP in Exchange 2007, as this
is no longer used in Administration I would use Powershell for your
Development needs, specifically the New-Mailbox cmdlet, and infact this is
best practice (Hosted Automated Solutions for Exchange 2007 use Powershell).

http://technet.microsoft.com/en-us/library/aa997663.aspx

Oliver
Author
5 May 2009 1:17 PM
kelly
Oliver is correct I host Powershell inside my VB code. The new-mailbox
command that Oliver referenced not only creates a mailbox but the user
as well. To create a mailbox for an existing user the enable-mailbox
command is used.
I think you will be better served if I send you links to articles
because my code is creating mailboxes for rooms, equipment, ...

http://msdn.microsoft.com/en-us/library/bb332449.aspx
http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx?df=100&forumid=407636&exp=0&select=2128159

These examples are in C# but translation is straight forward.

Best of luck

Kelly
Oliver Moazzezi [MVP] wrote:
Show quoteHide quote
> Hi there,
>
> I presume you are using Exchange 2007 as you mention the Exchange Management
> Console.
>
> I wouldn't personally use AD manipulation via LDAP in Exchange 2007, as this
> is no longer used in Administration I would use Powershell for your
> Development needs, specifically the New-Mailbox cmdlet, and infact this is
> best practice (Hosted Automated Solutions for Exchange 2007 use Powershell).
>
> http://technet.microsoft.com/en-us/library/aa997663.aspx
>
> Oliver
>
>
Author
5 May 2009 1:56 PM
yekolo
Thank you all for your responses.
Microsoft support also informed me that on mailbox creation, there are few
other things that are done behind the scenes and a mailbox created via AD
attributes manipulation may encounter issues.

I wish there was a way a to do this from Perl but it looks like my best
option is to call powershell commands from the existing code I have.



Show quoteHide quote
"kelly" wrote:

> Oliver is correct I host Powershell inside my VB code. The new-mailbox
> command that Oliver referenced not only creates a mailbox but the user
> as well. To create a mailbox for an existing user the enable-mailbox
> command is used.
> I think you will be better served if I send you links to articles
> because my code is creating mailboxes for rooms, equipment, ...
>
> http://msdn.microsoft.com/en-us/library/bb332449.aspx
> http://www.codeproject.com/KB/threads/AsyncPowerShell.aspx?df=100&forumid=407636&exp=0&select=2128159
>
> These examples are in C# but translation is straight forward.
>
> Best of luck
>
> Kelly
> Oliver Moazzezi [MVP] wrote:
> > Hi there,
> >
> > I presume you are using Exchange 2007 as you mention the Exchange Management
> > Console.
> >
> > I wouldn't personally use AD manipulation via LDAP in Exchange 2007, as this
> > is no longer used in Administration I would use Powershell for your
> > Development needs, specifically the New-Mailbox cmdlet, and infact this is
> > best practice (Hosted Automated Solutions for Exchange 2007 use Powershell).
> >
> > http://technet.microsoft.com/en-us/library/aa997663.aspx
> >
> > Oliver
> >
> >
>

Bookmark and Share