-----provide ad\exchange\lync\sharepoint\crm\sc\o365 and other Microsoft product implementation and outsourcing, qq:185426445. Phone 18666943750
Project sometimes do cross-forest mailbox migration time, conditions are not mature, such as security considerations or other considerations, can not do double-forest trust, this raises a question, how to use the history of mail, A simple and efficient solution is to bulk export messages from the source forest to a. pst file, in bulk Import into the destination domain forest, as follows:
1, give the Management account mail import and export permissions, the command is as follows:
Cls
WhoAmI
New-managementroleassignment-name "Import export_domain Admins"-user "Administrator"-role "Mailbox Import Export"
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/76/03/wKioL1ZIVqTAU_PLAAD8Gt-b7TQ037.png "title=" QQ picture 20151115165015.png "alt=" Wkiol1zivqtau_plaad8gt-b7tq037.png "/>
2, Bulk export mail to the C-Drive export folder, you need to pay attention to the corresponding disk space is sufficient, the command is as follows:
Get-mailbox-organizationalunit "Contoso.com/contoso"-resultsize Unlimited | %{new-mailboxexportrequest-mailbox $_.name-filepath ("\\localhost\c$\export\" + ($_.name) + ". pst")-baditemlimit 50}
We can see that the. pst file for each account is generated under the C:\export folder
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/76/04/wKioL1ZIgaeDKzJ0AAIXalVSY4w429.png "title=" QQ picture 20151115165015.png "alt=" Wkiol1zigaedkzj0aaixalvsy4w429.png "/>
3, Batch import PST file to the destination email address, the command is as follows:
Get-childitem \\localhost\c$\export\*.pst | Select Name,basename | %{new-mailboximportrequest-mailbox $_.basename-filepath ("\\localhost\c$\export\" +$_.name)-baditemlimit 50}
650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/76/04/wKioL1ZIg0qSekuOAAIK5YV4Xcc362.png "title=" QQ picture 20151115165015.png "alt=" Wkiol1zig0qsekuoaaik5yv4xcc362.png "/>650) this.width=650;" src= "/HTTP/ S3.51cto.com/wyfs02/m01/76/06/wkiom1zigz6spqc9aadf8mm2age733.png "title=" qq picture 20151115165015.png "alt=" Wkiom1zigz6spqc9aadf8mm2age733.png "/>
This article is from the "Zhou Ping Microsoft Technology Exchange Platform" blog, please be sure to keep this source http://yuntcloud.blog.51cto.com/1173839/1712956
PowerShell Management Series (26) PowerShell Operations Bulk Export & Import Mailbox