Learn how to export Exchange mailbox data to PST files. This method is often used as a native Exchange Server backup workaround, or a step in a manual Exchange Server migration.
Before you use this method in production environment, learn more about its pros and cons here: https://www.codetwo.com/guides/exchan...
Cmdlets used in the video:
Assigning Mailbox Import Export role:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "*user name or alias*"
Exporting a single mailbox:
New-MailboxExportRequest -Mailbox user -FilePath \\*server FQDN*\*shared folder name*\*PST name*.pst
Exporting mailbox items older than a month and with a subject including a keyword:
New-MailboxExportRequest -Mailbox user -ContentFilter {Received -lt (get-date).adddays(-30)} -and (Subject -like 'fwd*')} -FilePath \\server FQDN\shared folder name\*PST name*.pst
Exporting all items except from Junk & Deleted Items:
New-MailboxExportRequest -ExcludeFolders "#JunkEmail#","#DeletedItems#" -Mailbox user -FilePath \\*server FQDN*\*shared folder name*\*PST name*.pst
Exporting all mailboxes to a specified shared folder:
$AllMailboxes = Get-Mailbox;
$AllMailboxes = $AllMailboxes.SamAccountName;
foreach ($Mailbox in $AllMailboxes) { New-MailboxExportRequest -name "export $Mailbox" -Mailbox $Mailbox -FilePath "\\*server FQDN*\*shared folder name*\$($Mailbox).pst"}
____________
Created by CodeTwo https://www.codetwo.com
Follow us on:
/ codetwo || https://x.com/CodeTwoSoftware || / codetwo || / codetwo_software