|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Mailbox Movement CodeI 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? Hello Zamsheer,
> I have a coding requirement to automate the mailbox movement across What version of Exchange?> 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? > 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? > > > 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. -- Show quoteHide quoteEd 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? >> >> >> 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? > >> > >> > >> > > 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. -- Show quoteHide quoteEd Crowley MVP "There are seldom good technological solutions to behavioral problems." .. "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? >> >> >> >> >> >> >> >>
Other interesting topics
Create Mailbox
Exchange Web Services Migration MapiExceptionLowLevelInitializationFailure in C# with powershell webdav repeating appointments Stand alone MAPI? Exchange 2007, obtaining mailbox list without cmdlets? SMTP Transport event not working for C++ mailbox size (EWS) how to send an email without email address Prevent double booking of resources on Exchange 2007 (direct booking) |
|||||||||||||||||||||||