Short Description
Returns mailbox items.
Applies to
Product Edition: Community, Standard, Enterprise, Enterprise Plus
Syntax
This cmdlet provides the following parameter sets.
- 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. | True | Named | True (ByValue) | False |
Mailbox | Specifies a mailbox. The cmdlet will return items from this mailbox. | True | Named | True (ByValue) | False |
Folder | Specifies a mailbox folder. The cmdlet will return items from this folder. | 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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.
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 Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
- Run Get-VEXDatabase with the $session variable to get the mailbox database. Save the result to the $database variable.
- Run Get-VEXitem with the $database variable and the Query parameter to get items with names containing a specified keyword.
PS C:\PS> $session = Get-VBOExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session PS C:\PS> 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 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. Save the result to the $salesmailbox variable.
- Run Get-VEXitem with the $salesmailbox variable to get items from the north.sales mailbox.
PS C:\PS> $session = Get-VBOExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "sales" PS C:\PS> 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 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-VEXFolder with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run Get-VEXitem 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.
PS C:\PS> $session = Get-VBOExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session PS C:\PS> $mailbox = Get-VEXMailbox -Database $database -Name "sales" PS C:\PS> $contacts = Get-VEXFolder -Mailbox $mailbox PS C:\PS> 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 Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
- Run Get-VEXDatabase with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
- Run Get-VEXitem with the $database variable and the Query parameter to get items with names containing a specified keyword.
PS C:\PS> $session = Get-VBRExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb” PS C:\PS> 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 Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
- Run Get-VEXDatabase with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb database. Save the result to the $database variable.
- Run Get-VEXMailbox with the $database variable and the Name parameter. Save the result to the $salesmailbox variable.
- Run Get-VEXitem with the $salesmailbox variable to get items from the north.sales mailbox.
PS C:\PS> $session = Get-VBRExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb” PS C:\PS> $salesmailbox = Get-VEXMailbox -Database $database -Name "Sales" PS C:\PS> 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 Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
- Run Get-VEXDatabase with the $session variable and the Name parameter to get the Mailbox Database 0754907780.edb 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-VEXFolder with the $mailbox variable and the Name parameter to get the specific folder from the mailbox. Save the result to the $contacts variable.
- Run Get-VEXitem 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.
PS C:\PS> $session = Get-VBRExchangeItemRestoreSession PS C:\PS> $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb” PS C:\PS> $mailbox = Get-VEXMailbox -Database $database -Name "Sales" PS C:\PS> $contacts = Get-VEXFolder -Mailbox $mailbox -Name "Contacts" PS C:\PS> Get-VEXItem -Folder $contacts -Recurse |
Related Commands