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 the following parameter sets.

  • 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 of the mailbox owner.

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.

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 about common parameters, see http://go.microsoft.com/fwlink/p/?LinkID=113216.

For restoring or exporting from backups created by Veeam Backup for Microsoft Office 365.

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 Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
  3. 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.
  1. Run Get-VEXFolder with the $mailbox variable. Use the Recurse parameter to get parent folders with 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> 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 Get-VBOExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. Run Get-VEXDatabase with the $session variable to get a mailbox database. Save the result to the $database variable.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database.
  1. Run Get-VEXFolder 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 Get-VEXFolder with the $parent variable to get subfolders of the specified parent folder.

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> $parent = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

PS C:\PS> 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 Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. 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.
  3. 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.
  1. Run Get-VEXFolder with the $mailbox variable. Use the Recurse parameter to get parent folders with 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> 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 Get-VBRExchangeItemRestoreSession to get an active restore session. Save the result to the $session variable.
  2. 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.
  3. Run Get-VEXMailbox with the $database variable and the Name parameter to get the specific mailbox from the mailbox database.
  1. Run Get-VEXFolder 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 Get-VEXFolder with the $parent variable to get subfolders of the specified parent folder.

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> $parent = Get-VEXFolder -Mailbox $mailbox -Name "Contacts"

PS C:\PS> 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