Restore-VEXItem
Short Description
Restores backups of Exchange organization mailboxes.
Applies to
Product Edition: Enterprise, Enterprise Plus
Syntax
This cmdlet provides parameter sets that allow you to:
- To restore an Exchange organization mailbox:
Restore-VEXItem -Mailbox <VEXMailbox> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-ExcludeDrafts [<SwitchParameter>]] [-ExcludeDeletedItems [<SwitchParameter>]] [-ExcludeInPlaceHoldItems [<SwitchParameter>]] [-ExcludeLitigationHoldItems [<SwitchParameter>]] [<CommonParameters>] |
- To restore a folder of Exchange organization mailbox:
Restore-VEXItem -Folder <VEXFolder> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]] [<CommonParameters>] |
- To restore items of Exchange organization mailbox:
Restore-VEXItem -Item <VEXItem[]> [-Server <String>] [-TargetMailbox <String>] [-Credential <PSCredential>] [-ToFolder <String>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]] [<CommonParameters>] |
- To restore multiple Exchange organization mailboxes:
Restore-VEXItem -MultipleMailboxes <VEXMailbox[]> [-SkipUnresolvedMailboxes] [-RestoreItemsForLastDays <int>] [-Office365Credential <pscredential>] [-Domain <string>] [-Credential <pscredential>] [-RestoreChangedItem [<SwitchParameter>]] [-RestoreDeletedItem [<SwitchParameter>]] [-MarkAsUnread [<SwitchParameter>]] [-Force [<SwitchParameter>]] [<CommonParameters>] |
Detailed Description
This cmdlet restores backups of Exchange organization mailboxes.
Note: |
Mind the following:
|
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Item | Specifies an array of items for Exchange organization mailbox. The cmdlet will restore these items. Accepts the VEXItem[] type. To get this object, run the Get-VEXItem cmdlet. | True | Named | True (ByValue) | False |
Folder | Specifies a folder of an Exchange organization mailbox. The cmdlet will restore this folder with all its subfolders. Accepts the VEXFolder type. To get this object, run the Get-VEXFolder cmdlet. | True | Named | True (ByValue) | False |
Mailbox | Specifies an Exchange organization mailbox that you want to restore. Accepts the VEXMailbox type. To get this object, run the Get-VEXMailbox cmdlet. | True | Named | True (ByValue) | False |
Server | Specifies the Microsoft Exchange server with the Client Access Server (CAS) role. The cmdlet will perform a restore to this mailbox server. | False | Named | False | False |
Target | Specifies an Exchange organization mailbox. The cmdlet will perform a restore to this mailbox. Note that the mailbox should be in the "username@domain" format. If this parameter is omitted, the cmdlet will perform a restore to the same mailbox on the production Exchange server. | False | Named | False | False |
Credential | Specifies account credentials that you want to use for connecting to the Microsoft Exchange server. If omitted, the cmdlet will use a currently logged in user Windows account credentials to connect to the Microsoft Exchange server. | False | Named | False | False |
ToFolder | Specifies a mailbox folder. The cmdlet will restore backups to this folder. | False | Named | False | False |
Restore | Indicates that the cmdlet will restore all versions of mailbox items that were modified by the user. | False | Named | False | False |
Restore | Indicates that the cmdlet will restore mailbox items that were deleted by the user. | False | Named | False | False |
Mark | Indicates that the cmdlet will mark the restored mailbox items as unread. | False | Named | False | False |
Exclude | Indicates that the cmdlet will not restore the Deleted Items mailbox folder. | False | Named | False | False |
Exclude | Indicates that the cmdlet will not restore the Drafts mailbox folder. | False | Named | False | False |
Exclude | Indicates that the cmdlet will not restore preserved items of mailboxes placed on In-Place Hold. | False | Named | False | False |
Exclude | Indicates that the cmdlet will not restore the preserved items of mailboxes placed on Litigation Hold. | False | Named | False | False |
Force | Indicates that the cmdlet will perform a restore without notifying a user. | False | Named | False | False |
MultipleMailboxes | Specifies an Exchange organization multiple mailboxes that you want to restore. | True | Named | True (ByValue) | False |
SkipUnresolvedMailboxes | Indicates that the cmdlet will not restore mailboxes that it cannot resolve. | False | Named | False | False |
RestoreItemsForLastDays | Specifies the number of subsequent past days from which this cmdlet will restore the items from the selected users in the first place. | False | Named | False | False |
Office365Credential | Specifies account credentials that you want to use for connecting to the Microsoft Office365 server. | False | Named | False | False |
Domain | Specifies the Exchange organization domain. | False | Named | False | False |
<CommonParameters>
This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.
Example 1
[For Veeam Backup for Microsoft Office 365] This example shows how to restore mailbox items to the production Microsoft Exchange server.
- Get the sales mailbox:
- Run Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
- Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
- Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
- Run Get-Credential to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run Restore-VEXitem with the $salesmailbox and $creds variables.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session $salesmailbox = Get-VEXMailbox -Database $database -Name "sales" $creds = Get-Credential Restore-VEXItem -Mailbox $salesmailbox -Server outlook.office365.com -Credential $creds -RestoreChangedItem |
Example 2
[For Veeam Backup for Microsoft Office 365] This example shows how to restore the Contacts folder to the sales@abc.onmicrosoft.com mailbox on the production Microsoft Exchange server.
- Get the mailbox folder with the Contacts name:
- Run the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
- Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
- Run the Get-VEXFolder cmdlet with the $salesmailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run the Get-Credential cmdlet to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run the Restore-VEXitem cmdlet with the $contacts and $creds variables to restore the Contacts folder to the production Microsoft Exchange server. Use the TargetMailbox parameter to specify the mailbox to which the cmdlet will perform a restore.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session $salesmailbox = Get-VEXMailbox -Database $database -Name "north.sales" $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts" $creds = Get-Credential Restore-VEXItem -Folder $contacts -Server outlook.office365.com -Credential $creds -TargetMailbox "sales@abc.onmicrosoft.com" -RestoreChangedItem |
Example 3
[For Veeam Backup for Microsoft Office 365] This example shows how to restore all mailbox items from the Contacts folder and its subfolders to the production Microsoft Exchange server.
- Get all items from the Contacts folder:
- Run the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
- Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
- Run the Get-VEXFolder cmdlet with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run the Get-VEXItem cmdlet with the $contacts variable and the Recurse parameter to get items from the parent folder and its subfolders. Save the result to the $contactitems variable.
- Run the Get-Credential cmdlet to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run the Restore-VEXitem cmdlet with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session $mailbox = Get-VEXMailbox -Database $database -Name "sales" $contacts = Get-VEXFolder -Mailbox $mailbox $contactitems = Get-VEXItem -Folder $contacts -Recurse $creds = Get-Credential Restore-VEXItem -Item $contactitems -Server outlook.office365.com -Credential $creds -RestoreChangedItem -RestoreDeletedItem |
Example 4
[For Veeam Backup & Replication] This example shows how to restore mailbox items to the production Microsoft Exchange server.
- Get the sales mailbox:
- Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEXDatabase cmdlet with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
- Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
- Run the Get-Credential cmdlet to create a credential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run the Restore-VEXitem cmdlet with the $salesmailbox and $creds variables.
$session = Get-VBRExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb" $salesmailbox = Get-VEXMailbox -Database $database -Name "sales" $creds = Get-Credential Restore-VEXItem -Mailbox $salesmailbox -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem |
Example 5
[For Veeam Backup & Replication] This example shows how to restore the Contacts folder to the sales@Domain.local mailbox on the production Microsoft Exchange server.
- Get the mailbox folder with the Contacts name:
- Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEXDatabase cmdlet with the $session variable to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
- Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $salesmailbox variable.
- Run the Get-VEXFolder cmdlet with the $salesmailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run the Get-Credential cmdlet to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run the Restore-VEXItem cmdlet with the $contacts and $creds variables to restore the Contacts folder to the production Microsoft Exchange server. Use the TargetMailbox parameter to specify the mailbox to which the cmdlet will perform the restore.
$session = Get-VBRExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb" $salesmailbox = Get-VEXMailbox -Database $database -Name "sales" $contacts = Get-VEXFolder -Mailbox $salesmailbox -Name "Contacts" $creds = Get-Credential Restore-VEXItem -Folder $contacts -Server ExchangeCAS.Domain.local -Credential $creds -TargetMailbox "sales@Domain.local" -RestoreChangedItem |
Example 6
[For Veeam Backup & Replication] This example shows how to restore all mailbox items from the Contacts folder and its subfolders to the production Microsoft Exchange server.
- Get all items from the Contacts folder:
- Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
- Run the Get-VEXDatabase cmdlet with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
- Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
- Run the Get-VEXFolder cmdlet with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run the Get-VEXItem cmdlet with the $contacts variable and the Recurse parameter to get items from the parent folder and its subfolders. Save the result to the $contactitems variable.
- Run the Get-Credential cmdlet to create the PSCredential object. Type credentials that you want to use to connect to the Microsoft Exchange server. Save the result to the $creds variable.
- Run the Restore-VEXitem cmdlet with the $contacts and $creds variables to restore all items from the Contacts folder and its subfolders to the production Microsoft Exchange server.
$session = Get-VBRExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb" $mailbox = Get-VEXMailbox -Database $database -Name "sales" $contacts = Get-VEXFolder -Mailbox $mailbox -Name "Contacts" $contactitems = Get-VEXItem -Folder $contacts -Recurse $creds = Get-Credential Restore-VEXItem -Item $contactitems -Server ExchangeCAS.Domain.local -Credential $creds -RestoreChangedItem -RestoreDeletedItem |
Related Commands