Home All Groups Group Topic Archive Search About
Author
15 May 2009 2:35 PM
Zamsheer
I have a coding requirement to automate the mailbox movement across servers.
There are scripts available to move the mailboxes but there is no option to
select the source. It just moves the mailboxes from the logged in server to 
some destination provided. I looking for some APIs or some methods where I
will have option to select the source server and destination server and then
move the mailboxes sitting in any server in the domain. Could you please help
me in this regard?

Author
15 May 2009 3:52 PM
Karl Mitschke
Hello Zamsheer,

> I have a coding requirement to automate the mailbox movement across
> servers. There are scripts available to move the mailboxes but there
> is no option to select the source. It just moves the mailboxes from
> the logged in server to  some destination provided. I looking for some
> APIs or some methods where I will have option to select the source
> server and destination server and then move the mailboxes sitting in
> any server in the domain. Could you please help me in this regard?
>

What version of Exchange?
Are all your drivers up to date? click for free checkup

Author
18 May 2009 9:11 AM
Zamsheer
Hello Karl,
                   version of Exchange: Exchange 2003 SP2.
Regards,
Zamsheer

Show quoteHide quote
"Karl Mitschke" wrote:

> Hello Zamsheer,
>
> > I have a coding requirement to automate the mailbox movement across
> > servers. There are scripts available to move the mailboxes but there
> > is no option to select the source. It just moves the mailboxes from
> > the logged in server to  some destination provided. I looking for some
> > APIs or some methods where I will have option to select the source
> > server and destination server and then move the mailboxes sitting in
> > any server in the domain. Could you please help me in this regard?
> >
>
> What version of Exchange?
>
>
>
Author
19 May 2009 3:02 AM
Ed Crowley [MVP]
You use some kind of LDAP query to select the owning users of the mailboxes
you want to move, and based on the query you get the user objects themselves
and issue the MoveMailbox method on them.  This kind of technique was rather
useful in older versions of exchange, however, with your version of Exchange
I find that it's a whole lot easier to just use the Move Mailbox Wizard
becasue it's multithreaded (something that's hard to script), it provides
much better status information, and it has a pretty good GUI.  I find it
easier to write a script that sets some attribute to a value and use that
value to select the mailboxes from within the Move Mailbox Wizard.
--
Ed Crowley MVP
"There are seldom good technological solutions to behavioral problems."
..

Show quoteHide quote
"Zamsheer" <Zamsh***@discussions.microsoft.com> wrote in message
news:6EEB75AE-8F09-4D97-B2DD-43B609165A6A@microsoft.com...
> Hello Karl,
>                   version of Exchange: Exchange 2003 SP2.
> Regards,
> Zamsheer
>
> "Karl Mitschke" wrote:
>
>> Hello Zamsheer,
>>
>> > I have a coding requirement to automate the mailbox movement across
>> > servers. There are scripts available to move the mailboxes but there
>> > is no option to select the source. It just moves the mailboxes from
>> > the logged in server to  some destination provided. I looking for some
>> > APIs or some methods where I will have option to select the source
>> > server and destination server and then move the mailboxes sitting in
>> > any server in the domain. Could you please help me in this regard?
>> >
>>
>> What version of Exchange?
>>
>>
>>
Author
19 May 2009 6:30 AM
Zamsheer
The current script uses below method(Not complete code..A part of it...).
=============================================
Set objPerson = CreateObject ("CDO.Person")
Set objMailbox = objPerson.GetInterface ("IMailboxStore")
'Msgbox UserDN
Set objSourceHomeMDB = CreateObject("CDOEXM.MailBoxStoreDB")
            objSourceHomeMDB.DataSource.Open (TargetMdbDN)
objPerson.DataSource.Open "LDAP://" & UserDN
objMailbox.MoveMailbox "LDAP://" & TargetMdbDN
=============================================

I looking for some APIs or some methods where I
will have option to select the source server and destination server and then
move the mailboxes sitting in any server in the domain. Will it be possible
to create an application in .NET? Or is there any API available for this?

Show quoteHide quote
"Ed Crowley [MVP]" wrote:

> You use some kind of LDAP query to select the owning users of the mailboxes
> you want to move, and based on the query you get the user objects themselves
> and issue the MoveMailbox method on them.  This kind of technique was rather
> useful in older versions of exchange, however, with your version of Exchange
> I find that it's a whole lot easier to just use the Move Mailbox Wizard
> becasue it's multithreaded (something that's hard to script), it provides
> much better status information, and it has a pretty good GUI.  I find it
> easier to write a script that sets some attribute to a value and use that
> value to select the mailboxes from within the Move Mailbox Wizard.
> --
> Ed Crowley MVP
> "There are seldom good technological solutions to behavioral problems."
> ..
>
> "Zamsheer" <Zamsh***@discussions.microsoft.com> wrote in message
> news:6EEB75AE-8F09-4D97-B2DD-43B609165A6A@microsoft.com...
> > Hello Karl,
> >                   version of Exchange: Exchange 2003 SP2.
> > Regards,
> > Zamsheer
> >
> > "Karl Mitschke" wrote:
> >
> >> Hello Zamsheer,
> >>
> >> > I have a coding requirement to automate the mailbox movement across
> >> > servers. There are scripts available to move the mailboxes but there
> >> > is no option to select the source. It just moves the mailboxes from
> >> > the logged in server to  some destination provided. I looking for some
> >> > APIs or some methods where I will have option to select the source
> >> > server and destination server and then move the mailboxes sitting in
> >> > any server in the domain. Could you please help me in this regard?
> >> >
> >>
> >> What version of Exchange?
> >>
> >>
> >>
>
>
Author
20 May 2009 5:42 PM
Ed Crowley [MVP]
You search AD for the mailboxes on a particular server or store, and then
you move them one at a time.  Better, search AD for the mailboxes on a
particular mailbox or store, store a unique attribute in, say,
ExtensionAttribute10, and then search on that to run the Move Mailbox
Wizard, which does a much better job, as I said before, than any script
you're likely in a position to write.
--
Ed Crowley MVP
"There are seldom good technological solutions to behavioral problems."
..

Show quoteHide quote
"Zamsheer" <Zamsh***@discussions.microsoft.com> wrote in message
news:9D5333B7-21C0-4B43-AB23-1A49466B68AC@microsoft.com...
> The current script uses below method(Not complete code..A part of it...).
> =============================================
> Set objPerson = CreateObject ("CDO.Person")
> Set objMailbox = objPerson.GetInterface ("IMailboxStore")
> 'Msgbox UserDN
> Set objSourceHomeMDB = CreateObject("CDOEXM.MailBoxStoreDB")
>        objSourceHomeMDB.DataSource.Open (TargetMdbDN)
> objPerson.DataSource.Open "LDAP://" & UserDN
> objMailbox.MoveMailbox "LDAP://" & TargetMdbDN
> =============================================
>
> I looking for some APIs or some methods where I
> will have option to select the source server and destination server and
> then
> move the mailboxes sitting in any server in the domain. Will it be
> possible
> to create an application in .NET? Or is there any API available for this?
>
> "Ed Crowley [MVP]" wrote:
>
>> You use some kind of LDAP query to select the owning users of the
>> mailboxes
>> you want to move, and based on the query you get the user objects
>> themselves
>> and issue the MoveMailbox method on them.  This kind of technique was
>> rather
>> useful in older versions of exchange, however, with your version of
>> Exchange
>> I find that it's a whole lot easier to just use the Move Mailbox Wizard
>> becasue it's multithreaded (something that's hard to script), it provides
>> much better status information, and it has a pretty good GUI.  I find it
>> easier to write a script that sets some attribute to a value and use that
>> value to select the mailboxes from within the Move Mailbox Wizard.
>> --
>> Ed Crowley MVP
>> "There are seldom good technological solutions to behavioral problems."
>> ..
>>
>> "Zamsheer" <Zamsh***@discussions.microsoft.com> wrote in message
>> news:6EEB75AE-8F09-4D97-B2DD-43B609165A6A@microsoft.com...
>> > Hello Karl,
>> >                   version of Exchange: Exchange 2003 SP2.
>> > Regards,
>> > Zamsheer
>> >
>> > "Karl Mitschke" wrote:
>> >
>> >> Hello Zamsheer,
>> >>
>> >> > I have a coding requirement to automate the mailbox movement across
>> >> > servers. There are scripts available to move the mailboxes but there
>> >> > is no option to select the source. It just moves the mailboxes from
>> >> > the logged in server to  some destination provided. I looking for
>> >> > some
>> >> > APIs or some methods where I will have option to select the source
>> >> > server and destination server and then move the mailboxes sitting in
>> >> > any server in the domain. Could you please help me in this regard?
>> >> >
>> >>
>> >> What version of Exchange?
>> >>
>> >>
>> >>
>>
>>

Bookmark and Share