[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 488
  • Last Modified:

export command

Is there any shell command that can be used to export only the deleted items and recover deleted items folders from a mailbox and write the 2 folders to a pst file. By export i essentially mean take a copy not remove them from the live mailbox
1 Solution
Here are some examples that may work:
1) Recover items a user has deleted without going to backup
New-mailboxexportrequest -mailbox username -PSTFilePath \\machine\share\user-restore.pst -IncludeFolders "Recoverable Items"

2) Export deleted items to pst:
Export-Mailbox -Identity UserName -IncludeFolders "\Deleted Items" -FilePath \\machine\share\PSTFileName.pst

In both cases your identity/credential will have to have Full Access permission on the mailbox to be exported. To do this:

Get-Mailbox -Name username (could -Identity username) | Add-MailboxPermission -User yourname -AccessRights FullAccess

When typing the cmdlets with Powershell, make the tab key your friend.  Using it instead of typing confirms you're using the correct cmdlet.

Hope this helps...

pma111Author Commented:

Featured Post

Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now