Difference between revisions of "Exchange Server Mailbox Migration"
From DFWLPiki
(Created page with "Category:Exchange ==Exporting and Importing Mailboxes for Offline Exchange Server Migration== These are commands I am saving for later use on an upcoming migration projec...") |
|||
Line 2: | Line 2: | ||
==Exporting and Importing Mailboxes for Offline Exchange Server Migration== | ==Exporting and Importing Mailboxes for Offline Exchange Server Migration== | ||
− | + | Exporting from Exchange 2007: | |
Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all | Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all | ||
Line 20: | Line 20: | ||
− | Importing all .Pst files in Exchange 2013 | + | Importing all .Pst files in Exchange 2013 or 2016 |
− | (don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server) | + | (don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server AND restart Exchange powershell) |
Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName} | Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName} | ||
Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest | Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest |
Revision as of 15:28, 26 August 2018
Exporting and Importing Mailboxes for Offline Exchange Server Migration
Exporting from Exchange 2007:
Get-Mailbox | Add-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Export-Mailbox -PSTFolderPath c:\PSTs Get-Mailbox -Database “[SERVERNAME]\First Storage Group\Mailbox Database” | Import-Mailbox -PSTFolderPath c:\PSTs Get-Mailbox | Remove-MailboxPermission –user [adminusername] –AccessRight FullAccess –Inheritancetype all
Single run:
Import-Mailbox -Identity <mailboxUser> -PSTFolderPath D:\PSTs Export-Mailbox -Identity <mailboxUser> -PSTFolderPath D:\PSTs
Now same thing, but Exchange 2010
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User [DOMAIN\username] foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\UNCPath\PSTs\$($i.Alias).pst" } Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest
Importing all .Pst files in Exchange 2013 or 2016
(don't forget to ensure New-ManagementRoleAssignment has been set if you're working with a different server AND restart Exchange powershell)
Dir \\HOSTNAME\e$\PSTs\*.pst | %{ New-MailboxImportRequest -Name RecoveredPST -BatchName Recovered -BadItemLimit 1000000 -AcceptLargeDataLoss -Mailbox $_.BaseName -FilePath $_.FullName} Get-MailboxImportRequest -Status Completed | Remove-MailboxImportRequest
Same thing, but single maildatabase:
New-MailboxImportRequest -Mailbox [Username] -IsArchive -FilePath \\UNCPath\PSTs\filename.pst
Mailbox Migrations
Move Mailbox from one database to another: Test it to see if a sigle mailbox is ready to move:
New-MoveRequest -identity jhorne -TargetDatabase "DFWLP DEV Mailboxes" -WhatIf
Then move it:
New-MoveRequest -identity jhorne -TargetDatabase "DFWLP DEV Mailboxes"
Move all Mailboxes:
foreach ($i in (Get-Mailbox)) { New-MoveRequest -Identity $i -TargetDatabase "DLP Prod Mailboxes" }
Move Arbitration Mailboxes:
Get-Mailbox -Arbitration | New-Moverequest -Targetdatabase "Database Name"
List all mailboxes:
Get-mailbox
List all mailboxes and show current database:
Get-Mailbox | fl alias,database
List current migration jobs:
Get-MoveRequest
Remove completed migration jobs:
Get-MoveRequest -MoveStatus completed | Remove-MoveRequest