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

Get-VEXFolder

In this article

    Short Description

    Returns mailbox folders.

    Applies to

    Product Edition: Community, Standard, Enterprise, Enterprise Plus

    Syntax

    This cmdlet provides parameter sets that allow you to:

    • To get the first level of folders from the mailbox:

    Get-VEXFolder [-Mailbox] <VEXMailbox> [[-Name] <string>] [-Recurse]  [<CommonParameters>]

    • To get subfolders under the specified parent folder from the mailbox:

    Get-VEXFolder [-Parent] <VEXFolder> [[-Name] <string>] [-Recurse]  [<CommonParameters>]

    Detailed Description

    This cmdlet returns mailbox folders on which the user has owner permissions.

    Parameters

    Parameter

    Description

    Type

    Required

    Position

    Accept Pipeline Input

    Accept Wildcard Characters

    Mailbox

    Specifies a mailbox database. The cmdlet will return all mailboxes from this database.

    Accepts the VEXMailbox type. To get this object, run the Get-VEXMailbox cmdlet.

    True

    0

    True (ByValue)

    False

    Name

    Specifies a name of the mailbox. The cmdlet will return the mailbox with this name.

    String

    False

    1

    False

    True

    Parent

    Specifies a parent folder in the mailbox. The cmdlet will return subfolders of this parent folder.

    Accepts the VEXFolder type.

    True

    0

    True (ByValue)

    False

    Recurse

    Indicates that the cmdlet will return the specified parent folder and all of its subfolders.

    SwitchParameter

    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 all folders with subfolders from the sales mailbox.

    1. Get the 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 to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
    1. Run the Get-VEXFolder cmdlet with the $mailbox variable. Use the Recurse parameter to get parent folders with subfolders.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

    $mailbox = Get-VEXMailbox -Database $database -Name "sales"

    Get-VEXFolder -Mailbox $mailbox -Recurse

    Example 2

    [For Veeam Backup for Microsoft Office 365] This example shows how to get subfolders under the Contacts parent folder.

    1. Get the 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 to get the specific mailbox from the mailbox database.
    1. Run the Get-VEXFolder cmdlet with the $mailbox variable and the Name parameter to get the parent folder whose subfolders you want to retrieve. Save the result to the $parent variable.
    2. Run the Get-VEXFolder cmdlet with the $parent variable to get subfolders of the specified parent folder.

    $session = Get-VBOExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session

    $mailbox = Get-VEXMailbox -Database $database -Name "Sales"

    $parent = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

    Get-VEXFolder -Parent $parent

    Example 3

    [For Veeam Backup & Replication] This example shows how to get all folders with subfolders from the sales mailbox.

    1. Get the 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 to get the specific mailbox from the mailbox database. Save the result to the $mailbox variable.
    1. Run the Get-VEXFolder cmdlet with the $mailbox variable. Use the Recurse parameter to get parent folders with subfolders.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name “Mailbox Database 0754907780.edb”

    $mailbox = Get-VEXMailbox -Database $database -Name "Sales"

    Get-VEXFolder -Mailbox $mailbox -Recurse

    Example 4

    [For Veeam Backup & Replication] This example shows how to get subfolders under the Contacts parent folder.

    1. Get the 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 to get the specific mailbox from the mailbox database.
    1. Run the Get-VEXFolder cmdlet with the $mailbox variable and the Name parameter to get the parent folder whose subfolders you want to retrieve. Save the result to the $parent variable.
    2. Run the Get-VEXFolder cmdlet with the $parent variable to get subfolders of the specified parent folder.

    $session = Get-VBRExchangeItemRestoreSession

    $database = Get-VEXDatabase -Session $session -Name "Mailbox Database 0754907780.edb"

    $mailbox = Get-VEXMailbox -Database $database -Name "Sales"

    $parent = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

    Get-VEXFolder -Parent $parent

    Related Commands