New-mailboxExportRequest and New-MailboxImportRequest in sequence


I need to export mail to .pst and when status -eq 'complete' then run import .pst to another mailbox. Does anybody know how to do this?

Best Regards Trond Jenssen

No Data
  • As an alternative, there is a free tool from Priasoft that can export data using powershell, but is not run from the Exchange server directly.
    Take a look at Super-ExMerge:

    You only need a windows host, powershell, and some version of Outlook installed to use it.
    You'll need either FullAccess permissions or the password of the mailbox you want to export.

    Simple in 3 lines of code:
    $endPoints = new-ConnectionInfo -SourceType Mailbox -TargetType Mailbox -SourceSmtp -SourceServer -SourceCreds '' -TargetSmtp -TargetServer -TargetCreds ''
    $task = new-SyncTask $endPoints -OneWaySyncSourceToTarget
    add-SyncTask $task

    you can then check the status periodically using Get-SyncTask -TaskID -States Completed and redo the above 3 lines, but flip the 'source' and 'target' endpoints.

No Data