Home
%3CLINGO-SUB%20id%3D%22lingo-sub-592426%22%20slang%3D%22en-US%22%3ECross%20Org%20mailbox%20migration%20cleanup%20with%20Exchange%20Server%202007%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-592426%22%20slang%3D%22en-US%22%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EAfter%20performing%20a%20Cross%20Org%20mailbox%20migration%2C%20administrators%20need%20to%20enable%20mail%20redirection%20from%20the%20source%20to%20the%20target%20forest.%20Even%20though%20GALSync%20remains%20the%20recommended%20tool%20for%20this%20purpose%2C%20the%20initial%20synchronization%20process%20can%20take%20some%20time%20which%20means%20that%20messages%20queued%20during%20the%20move%20and%20messages%20sent%20from%20users%20in%20the%20source%20forest%20before%20the%20contacts%20objects%20were%20created%20will%20NDR.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ETo%20address%20this%20issue%2C%20Exchange%202007%20added%20to%20Move-mailbox%20a%20parameter%20called%20%3CB%3ESourceMailboxCleanupOptions%3C%2FB%3E%20to%20determine%20what%20%22source%20cleanup%22%20will%20be%20done%20after%20the%20move.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EFor%20RTM%2C%20this%20parameter%20accepts%202%20options%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EDeleteSourceMailbox%3A%3C%2FB%3E%20Deletes%20mailbox%20attributes%20from%20source%20user%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EDeleteSourceNTAccount%3A%3C%2FB%3E%20Deletes%20source%20user%20AD%20object%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EThese%20two%20options%20don't%20address%20completely%20the%20issue%20but%20allow%20easier%20scripting%20than%20we%20had%20in%20the%20Exchange%202003%20days.%20To%20fully%20support%20our%20additional%20cleanup%20needs%20we%20have%20added%202%20new%20options%20for%20this%20parameter%20in%20SP1%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3ECreateSourceContact%3A%3C%2FB%3E%20Deletes%20source%20user%20AD%20object%20and%20creates%20a%20contact%20on%20the%20source%20forest%20that%20points%20to%20the%20mailbox%20just%20moved%20to%20the%20target%20forest%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EMailEnableSourceAccount%3A%3C%2FB%3E%20Deletes%20mailbox%20attributes%20from%20source%20user%20and%20mail%20enables%20the%20source%20user%20so%20it%20points%20to%20the%20mailbox%20just%20moved%20to%20the%20target%20forest%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20style%3D%22color%3A%20%230000ff%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EWorkaround%20for%20Exchange%202007%20RTM%3A%20A%20cross%20org%20migration%20cleanup%20script%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20sizset%3D%220%22%20sizcache%3D%228%22%3E%3CSPAN%20sizset%3D%220%22%20sizcache%3D%228%22%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EAs%20I%20mentioned%20above%2C%20our%20RTM%20version%20has%20an%20improved%20but%20incomplete%20%22cleanup%22%20functionality.%20To%20help%20our%20customers%20to%20perform%20these%20cleanup%20options%20before%20Service%20Pack%201%20is%20released%2C%20I%20have%20created%20a%20PowerShell%20script%20that%20provides%20similar%20functionality%3A%20It%20creates%20a%20mail%20enabled%20contact%20(when%20the%20option%20to%20delete%20the%20source%20user%20is%20used)%20or%20it%20can%20mail%20enable%20the%20user%20account%20(when%20the%20option%20to%20delete%20the%20source%20mailbox%20attributes%20is%20used).%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EIt%20is%20worth%20noticing%20that%20this%20script%20has%20some%20limitations%20when%20compared%20to%20our%20SP1%20move-mailbox%20task%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EIt%20has%20to%20be%20executed%20from%20the%20source%20Forest%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ELogging%20is%20not%20as%20detailed%20as%20the%20actual%20move-mailbox%20native%20log%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ESince%20the%20script%20needs%20to%20be%20executed%20from%20the%20source%20Forest%20it%20will%20not%20work%20when%20the%20source%20Forest%20does%20not%20have%20a%20Exchange%202007%20server%20installed%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EHere%20is%20an%20overview%20of%20the%20steps%20performed%20by%20the%20script%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EPre-validates%20CSV%20and%20parameters%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EStore%20data%20about%20mailboxes%20that%20will%20be%20moved%20to%20be%20used%20later%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ETry%20to%20move%20all%20mailboxes.%20Check%20whether%20task%20was%20successful.%20If%20not%2C%20stop%20execution%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EUse%20the%20newly%20moved%20mailbox%20primary%20SMTP%20address%20as%20the%20External%20email%20address%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EIf%20creating%20a%20contact%3A%20%3C%2FSPAN%3E%3CUL%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ECreates%20contact%20object%20and%20uses%20mailbox%20display%20name%20as%20contact%20name%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EUse%20mailbox%20alias%20as%20alias%20if%20creating%20contact%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ECopy%20proxies%20from%20moved%20mailbox%20as%20secondary%20proxies%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3ETry%20to%20add%20target%20mailbox%20SMTP%20to%20proxy%20collection%20(it%20is%20necessary%20if%20address%20was%20calculated%20for%20a%20Ti%20target%20server)%20%3C%2FSPAN%3E%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EAdd%20target%20mailbox%20LegDN%20as%20X500%20to%20proxy%20collection%3C%2FSPAN%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EHere%20is%20an%20example%20of%20a%20mailbox%20migration%20using%20the%20script%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EStep%201%3C%2FB%3E%20%E2%80%93%20Create%20variables%20that%20hold%20credentials%20for%20source%20and%20target%20Forests%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%24source%20%3D%20get-credential%3CBR%20%2F%3E%24target%20%3D%20get-credential%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EStep%202%3C%2FB%3E%20%E2%80%93%20Create%20a%20csv%20file%20that%20contains%20information%20about%20the%20mailboxes%20you%20want%20to%20migrate%20(for%20example%2C%20mailboxes%20that%20have%20contain%20Paul%20in%20identity)%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3Eget-mailbox%20Paul*%20%7C%20export-csv%20C%3A%5Cusers.csv%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%3CB%3EStep%203%3C%2FB%3E%20%E2%80%93%20Call%20script%20passing%20all%20necessary%20information%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EC%3A%5CmigrationCleanup%26gt%3B.%5CmigrationCleanup.ps1%20-SourceGlobalCatalog%20sourceServer.SourceDomain.com%20-SourceDomainController%20sourceServer.SourceDomain.com%20-DomainController%20targetServer.TargetDomain.com%20-GlobalCatalog%20targetServer.TargetDomain.com%20-NTAccountOU%20'CN%3DUsers%2CDC%3D%20TargetDomain%20%2CDC%3Dcom'%20-ContactsOU%20%22Users%22%20-UsersFile%20%22C%3A%5Cusers.csv%22%20-TargetDatabase%20%22%20targetServer%20%5CMailbox%20Database%22%20-SourceMailboxCleanupOptions%20DeleteSourceMailbox%20-SourceForestCredential%20%24source%20-TargetForestCredential%20%24target%20-TargetSMTPDomain%20%22TargetDomain.com%22%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EIn%20this%20example%2C%20I%20had%20the%20following%20server%20configuration%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3C%2FP%3E%0A%3CTABLE%20cellpadding%3D%220%22%20cellspacing%3D%220%22%20border%3D%221%22%20class%3D%22MsoNormalTable%22%20style%3D%22BORDER-RIGHT%3A%20medium%20none%3B%20BORDER-TOP%3A%20medium%20none%3B%20BORDER-LEFT%3A%20medium%20none%3B%20BORDER-BOTTOM%3A%20medium%20none%3B%20BORDER-COLLAPSE%3A%20collapse%3B%20mso-yfti-tbllook%3A%201184%3B%20mso-padding-alt%3A%200in%205.4pt%200in%205.4pt%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-insideh%3A%20.5pt%20solid%20black%3B%20mso-border-insidev%3A%20.5pt%20solid%20black%22%3E%0A%3CTBODY%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%200%3B%20mso-yfti-firstrow%3A%20yes%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20border%3A%20black%201pt%20solid%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-SourceGlobalCatalog%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20black%201pt%20solid%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EsourceServer.SourceDomain.com%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%201%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-SourceDomainController%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EsourceServer.SourceDomain.com%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%202%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-DomainController%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EtargetServer.TargetDomain.com%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%203%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-GlobalCatalog%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EtargetServer.TargetDomain.com%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%204%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-NTAccountOU%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E'CN%3DUsers%2CDC%3DFRICIB-dom%2CDC%3Dextest%2CDC%3Dmicrosoft%2CDC%3Dcom'%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%205%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-ContactsOU%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%22Users%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%206%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-UsersFile%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%22C%3A%5Cusers.csv%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%207%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-TargetDatabase%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%22%20targetServer%5CMailbox%20Database%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%208%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-SourceMailboxCleanupOptions%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EDeleteSourceMailbox%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%209%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-SourceForestCredential%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%24source%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%2010%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-TargetForestCredential%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%24target%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%20style%3D%22mso-yfti-irow%3A%2011%3B%20mso-yfti-lastrow%3A%20yes%22%3E%0A%3CTD%20width%3D%22217%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20black%201pt%20solid%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20162.9pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-TargetSMTPDomain%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22247%22%20valign%3D%22top%22%20style%3D%22border-bottom%3A%20black%201pt%20solid%3B%20border-left%3A%20%23f0f0f0%3B%20padding-bottom%3A%200in%3B%20background-color%3A%20transparent%3B%20padding-left%3A%205.4pt%3B%20width%3A%20185.55pt%3B%20padding-right%3A%205.4pt%3B%20border-top%3A%20%23f0f0f0%3B%20border-right%3A%20black%201pt%20solid%3B%20padding-top%3A%200in%3B%20mso-border-alt%3A%20solid%20black%20.5pt%3B%20mso-border-left-alt%3A%20solid%20black%20.5pt%3B%20mso-border-top-alt%3A%20solid%20black%20.5pt%3B%22%3E%3CP%20class%3D%22MsoNormal%22%3E%3CSPAN%20style%3D%22font-family%3A%20'Verdana'%2C'sans-serif'%3B%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%22TargetDomain.com%22%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%20sizset%3D%220%22%20sizcache%3D%228%22%3E%3CSPAN%20sizset%3D%220%22%20sizcache%3D%228%22%20style%3D%22color%3A%20%23000000%3B%22%3E%20%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EMost%20parameters%20work%20the%20same%20way%20they%20do%20in%20move-mailbox.%20The%20exceptions%20are%20%E2%80%93ContactsOU%2C%20which%20determines%20where%20your%20source%20contact%20will%20be%20created%20and%20the%20parameter%20%E2%80%93TargetSMTPDomain%2C%20which%20is%20used%20when%20moving%20mailboxes%20to%20legacy%20Exchange%20servers.%20In%20these%20cases%2C%20the%20target%20SMTP%20address%20is%20stamped%20in%20the%20target%20mailbox%20by%20the%20RUS%2C%20which%20means%20it%20might%20not%20be%20present%20right%20away.%20Since%20we%20need%20that%20target%20address%20to%20be%20used%20as%20the%20%E2%80%93ExternalEmailAddress%20of%20the%20newly%20created%20source%20mail%20contact%20or%20mail%20enabled%20user%2C%20we%20will%20use%20the%20%E2%80%93TargetSMTPDomain%20parameter%20along%20with%20the%20alias%20of%20the%20source%20mailbox%20as%20a%20substitute%20for%20it.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EBesides%20the%20limitations%20mentioned%20earlier%20(and%20all%20the%20optimizations%20I%20know%20you%20will%20come%20up%20with)%2C%20this%20script%20should%20work%20just%20fine%20and%20allow%20you%20to%20avoid%20the%20large%20majority%20of%20NDRs%20for%20email%20sent%20during%20and%20after%20a%20Cross%20Org%20mailbox%20move.%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EYou%20can%20get%20the%20migration%20cleanup%20script%20here%3A%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CA%20target%3D%22_blank%22%20href%3D%22http%3A%2F%2Fgallery.technet.microsoft.com%2Fscriptcenter%2F724852c3-8bb6-4d9a-be99-4af0546e0f63%22%20title%3D%22Cross%20Org%20mailbox%20migration%20cleanup%20with%20Exchange%20Server%202007%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EmigrationCleanup.ps1%20script%3C%2FSPAN%3E%3C%2FA%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E%20%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3E-%20%3C%2FSPAN%3E%3CA%20href%3D%22http%3A%2F%2Fblogs.technet.com%2Farchive%2F2006%2F10%2F27%2F429521.aspx%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%20target%3D%22_blank%22%3E%3CSPAN%20style%3D%22font-size%3A%20small%3B%22%3EPaul%20MacKnight%3C%2FSPAN%3E%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E

After performing a Cross Org mailbox migration, administrators need to enable mail redirection from the source to the target forest. Even though GALSync remains the recommended tool for this purpose, the initial synchronization process can take some time which means that messages queued during the move and messages sent from users in the source forest before the contacts objects were created will NDR.

To address this issue, Exchange 2007 added to Move-mailbox a parameter called SourceMailboxCleanupOptions to determine what "source cleanup" will be done after the move.

For RTM, this parameter accepts 2 options:

  • DeleteSourceMailbox: Deletes mailbox attributes from source user
  • DeleteSourceNTAccount: Deletes source user AD object

These two options don't address completely the issue but allow easier scripting than we had in the Exchange 2003 days. To fully support our additional cleanup needs we have added 2 new options for this parameter in SP1:

  • CreateSourceContact: Deletes source user AD object and creates a contact on the source forest that points to the mailbox just moved to the target forest
  • MailEnableSourceAccount: Deletes mailbox attributes from source user and mail enables the source user so it points to the mailbox just moved to the target forest

Workaround for Exchange 2007 RTM: A cross org migration cleanup script

As I mentioned above, our RTM version has an improved but incomplete "cleanup" functionality. To help our customers to perform these cleanup options before Service Pack 1 is released, I have created a PowerShell script that provides similar functionality: It creates a mail enabled contact (when the option to delete the source user is used) or it can mail enable the user account (when the option to delete the source mailbox attributes is used).

It is worth noticing that this script has some limitations when compared to our SP1 move-mailbox task:

  • It has to be executed from the source Forest
  • Logging is not as detailed as the actual move-mailbox native log
  • Since the script needs to be executed from the source Forest it will not work when the source Forest does not have a Exchange 2007 server installed

Here is an overview of the steps performed by the script:

  • Pre-validates CSV and parameters
  • Store data about mailboxes that will be moved to be used later
  • Try to move all mailboxes. Check whether task was successful. If not, stop execution
  • Use the newly moved mailbox primary SMTP address as the External email address
  • If creating a contact:
    • Creates contact object and uses mailbox display name as contact name
    • Use mailbox alias as alias if creating contact
  • Copy proxies from moved mailbox as secondary proxies
  • Try to add target mailbox SMTP to proxy collection (it is necessary if address was calculated for a Ti target server)
  • Add target mailbox LegDN as X500 to proxy collection

Here is an example of a mailbox migration using the script:

Step 1 – Create variables that hold credentials for source and target Forests

$source = get-credential
$target = get-credential

Step 2 – Create a csv file that contains information about the mailboxes you want to migrate (for example, mailboxes that have contain Paul in identity)

get-mailbox Paul* | export-csv C:\users.csv

Step 3 – Call script passing all necessary information:

C:\migrationCleanup>.\migrationCleanup.ps1 -SourceGlobalCatalog sourceServer.SourceDomain.com -SourceDomainController sourceServer.SourceDomain.com -DomainController targetServer.TargetDomain.com -GlobalCatalog targetServer.TargetDomain.com -NTAccountOU 'CN=Users,DC= TargetDomain ,DC=com' -ContactsOU "Users" -UsersFile "C:\users.csv" -TargetDatabase " targetServer \Mailbox Database" -SourceMailboxCleanupOptions DeleteSourceMailbox -SourceForestCredential $source -TargetForestCredential $target -TargetSMTPDomain "TargetDomain.com"

In this example, I had the following server configuration:

-SourceGlobalCatalog

sourceServer.SourceDomain.com

-SourceDomainController

sourceServer.SourceDomain.com

-DomainController

targetServer.TargetDomain.com

-GlobalCatalog

targetServer.TargetDomain.com

-NTAccountOU

'CN=Users,DC=FRICIB-dom,DC=extest,DC=microsoft,DC=com'

-ContactsOU

"Users"

-UsersFile

"C:\users.csv"

-TargetDatabase

" targetServer\Mailbox Database"

-SourceMailboxCleanupOptions

DeleteSourceMailbox

-SourceForestCredential

$source

-TargetForestCredential

$target

-TargetSMTPDomain

"TargetDomain.com"

Most parameters work the same way they do in move-mailbox. The exceptions are –ContactsOU, which determines where your source contact will be created and the parameter –TargetSMTPDomain, which is used when moving mailboxes to legacy Exchange servers. In these cases, the target SMTP address is stamped in the target mailbox by the RUS, which means it might not be present right away. Since we need that target address to be used as the –ExternalEmailAddress of the newly created source mail contact or mail enabled user, we will use the –TargetSMTPDomain parameter along with the alias of the source mailbox as a substitute for it.

Besides the limitations mentioned earlier (and all the optimizations I know you will come up with), this script should work just fine and allow you to avoid the large majority of NDRs for email sent during and after a Cross Org mailbox move.

You can get the migration cleanup script here:

migrationCleanup.ps1 script

- Paul MacKnight

10 Comments
Not applicable
Off topic, but I can't get your Ehloidea at microsoft . com email suggestion address to work.
Not applicable
Robert,

Thanks, I just reproduced this problem and am looking into it.

In the mean time - you can email the idea to me at: ninob AT microsoft DOT com
Not applicable
We tried using the export-csv this week for another problem and noticed that it would only export the primary e-mail address to the csv file.  The users have multiple e-mail addresses assigned.  That right there made export-csv useless to us.  Is there a way to have export-csv export all e-mail addresses assigned to a user?
Not applicable
Maybe I am missing something, but since this PS1 script must be run in the source domain, how is it any different from the following VBScript (barring the piping of a user list)

DIM strUserDN   '*** This is the distinguished name of the user (string)
DIM objUser  '*** Object variable for containing the user
DIM strEmailAddr '*** Populate with the external email address of the mail-enabled user

'*** Set variables
strUserDN = "[Distinguished Name of Account]"  
strEmailAddr = "[email address]"

'*** Get user object
wscript.echo "Connecting to user " & strUserDN
Set objUser = GetObject("LDAP://" & strUserDN)

'*** Wipe out the existing Mailbox
wscript.echo "Removing mailbox"
objUser.DeleteMailBox
objUser.SetInfo()

'*** Okay, now let's mail-enable it
wscript.echo "mail-enabling the user with address: " & strEmailAddr
objUser.MailEnable strEmailAddr
objUser.Put "internetEncoding",1310720
objUser.SetInfo()
Not applicable
Elan,
I am not sure about this, I can try to repro here and forward to some PowerSheel guy. But regarding this script, it should not matter because the csv only provides the ID, we get the proxies from cmdlets.

Anthony,
That's not exactly what we do. We set the target address on the contact, copy the new legDN as X500, copy primary SMTPs as secondary, and other things. Besides that, we also differentiate between creating a contact and a mail enabled user.

Thanks
Not applicable
Robert,

BTW - we have fixed the ehloidea problem, thanks again for reporting it!
Not applicable
This all seems pretty convoluted.  Are there any third party tools that handle all this?

I only know of 2 companies right now that seem to support migrations to 2007, and only one of them, Priasoft, seems to support this "Contact" thing as well as other things.

Does anybody at MS or otherwise have any experience or comments about these third-party tools?
Not applicable
Robert,
You are right, Cross Org migrations are a bit complex. I am not aware of any tools (Quest had a 2003 migration tool) but I don't believe the complexity will decrease just by using other tools.

If you have any specififc questions just send me an email: paul.macknight at microsoft.com and I will be glad to help you.

Paul
Not applicable
I am doing a 2000 to 2007 transition. Most users are moved however I am getting this error message on the few that are left. There is no storage limits on any stores or mailboxes. I have been able to create a new mailbox on 2000 and move it 2007 just find. I have ran the cleanup agent on 2000. how do you do it on 2007.

Error was found for User (User@domain.com) because: Error occurred in the step: Preparing mailbox to be moved. Failed to copy basic mailbox information with error: After moving a mailbox, you must wait for cleanup operations to complete before you can move it again., error code: -1056749241
Not applicable
Is it possible to do cross-org from Exchange 2007 back to 2003 with 2003 wizard?