Help Center
Choose product document...
Veeam Backup & Replication 9.5 Update 4
Veeam Explorers PowerShell Reference

Get-VEXFolder

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

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.

False

1

False

True

Parent

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

True

0

True (ByValue)

False

Recurse

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

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see 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

Veeam Large Logo

User Guide for VMware vSphere

User Guide for Microsoft Hyper-V

Enterprise Manager User Guide

Veeam Cloud Connect Guide

Veeam Agent Management Guide

Veeam Explorers User Guide

Backup and Restore of SQL Server Databases

Veeam Plug-ins for Enterprise Applications

PowerShell Reference

Veeam Explorers PowerShell Reference

RESTful API Reference

Required Permissions

Veeam Availability for Nutanix AHV

Veeam Backup for Microsoft Office 365 Documentation

Veeam ONE Documentation

Veeam Agent for Windows Documentation

Veeam Agent for Linux Documentation

Veeam Management Pack Documentation