This is an archive version of the document. To get the most up-to-date information, see the current version.

Get-VEXItem

In this article

    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
    Pipeline
    Input

    Accept
    Wildcard
    Characters

    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.

    1. Get the mailbox database:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get the mailbox database. Save the result to the $database variable.
    1. 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.

    1. Get the north.sales mailbox:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
    3. Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter. Save the result to the $salesmailbox variable.
    1. 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.

    1. Get the Contacts folder:
    1. Run the Get-VBOExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. Run the Get-VEXDatabase cmdlet with the $session variable to get a mailbox database. Save the result to the $database variable.
    3. 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.
    4. 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.
    1. 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.

    1. Get a mailbox database:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. 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.
    1. 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.

    1. Get the north.sales mailbox:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. 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.
    3. Run the Get-VEXMailbox cmdlet with the $database variable and the Name parameter. Save the result to the $salesmailbox variable.
    1. 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.

    1. Get the Contacts folder:
    1. Run the Get-VBRExchangeItemRestoreSession cmdlet to get an active restore session. Save the result to the $session variable.
    2. 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.
    3. 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.
    4. 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.
    1. 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