Get-VEXItem
Short Description
Returns mailbox items.
Applies to
Product Edition: Community, Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides parameter sets that allow you to:
- To get mailbox items from a mailbox database:
Get-VEXItem -Database <VEXDatabase[]> [-Query <string>] [<CommonParameters>] |
- To get mailbox items from a mailbox:
Get-VEXItem -Mailbox <VEXMailbox> [-Query <string>] [<CommonParameters>] |
- To get mailbox items from a folder:
Get-VEXItem -Folder <VEXFolder> [-Query <string>] [-Recurse] [<CommonParameters>] |
Detailed Description
This cmdlet returns mailbox items. You can search the folder, mailbox or the entire mailbox database to get the necessary item.
Parameters
Parameter | Description | Required | Position | Accept | Accept |
Database | Specifies a mailbox database. The cmdlet will return items from this database. Accepts the VEXDatabase[] type. To get this object, run the Get-VEXDatabase cmdlet. | True | Named | True (ByValue) | False |
Mailbox | Specifies a mailbox. The cmdlet will return items from this mailbox. Accepts the VEXMailbox type. To get this object, run the Get-VEXMailbox cmdlet. | True | Named | True (ByValue) | False |
Folder | Specifies a mailbox folder. The cmdlet will return items from this folder. Accepts the VEXFolder type. To get this object, run the Get-VEXFolder cmdlet. | True | Named | True (ByValue) | False |
Query | Allows using keywords for mailbox item search. The cmdlet will return items that match the search query from the specified folder, database or mailbox. | False | Named | False | True |
Recurse | Indicates that the cmdlet will return items from all subfolders of the specified parent folder. | 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 get mailbox items with names containing support from a mailbox database.
- Get the mailbox database:
- 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 the mailbox database. Save the result to the $database variable.
- Run the Get-VEXitem cmdlet with the $database variable and the Query parameter to get items with names containing a specified keyword.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session Get-VEXItem -Database $database -Query "support" |
Example 2
[For Veeam Backup for Microsoft Office 365] This example shows how to get mailbox items from the north.sales mailbox.
- Get the north.sales mailbox:
- 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. Save the result to the $salesmailbox variable.
- Run the Get-VEXitem with the $salesmailbox variable to get items from the north.sales mailbox.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session $salesmailbox = Get-VEXMailbox -Database $database -Name "sales" Get-VEXItem -Mailbox $salesmailbox |
Example 3
[For Veeam Backup for Microsoft Office 365] This example shows how to get items from the Contacts mailbox folder.
- Get 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 to get items from the Contacts folder. Use the Recurse parameter to get items from the Contacts folder and its subfolders.
$session = Get-VBOExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session $mailbox = Get-VEXMailbox -Database $database -Name "sales" $contacts = Get-VEXFolder -Mailbox $mailbox Get-VEXItem -Folder $contacts -Recurse |
Example 4
[For Veeam Backup & Replication] This example shows how to get mailbox items with names containing the support form in a mailbox database.
- Get a mailbox database:
- 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-VEXitem with the $database variable and the Query parameter to get items with names containing a specified keyword.
$session = Get-VBRExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb” Get-VEXItem -Database $database -Query "support" |
Example 5
[For Veeam Backup & Replication] This example shows how to get mailbox items from the north.sales mailbox.
- Get the north.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. Save the result to the $salesmailbox variable.
- Run the Get-VEXitem cmdlet with the $salesmailbox variable to get items from the north.sales mailbox.
$session = Get-VBRExchangeItemRestoreSession $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb” $salesmailbox = Get-VEXMailbox -Database $database -Name "Sales" Get-VEXItem -Mailbox $salesmailbox |
Example 6
[For Veeam Backup & Replication] This example shows how to get items from the Contacts mailbox folder.
- Get 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 to get items from the Contacts folder. Use the Recurse parameter to get items from the Contacts folder and its subfolders.
$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" Get-VEXItem -Folder $contacts -Recurse |
Related Commands