Export (0) Print
Expand All
Expand Minimize

Get-MailboxFolder

 

Applies to: Exchange Server 2013, Exchange Online

Topic Last Modified: 2014-03-13

This cmdlet is available in on-premises Exchange Server 2013 and in the cloud-based service. Some parameters and settings may be exclusive to one environment or the other.

Use the Get-MailboxFolder cmdlet to retrieve folders for a specified mailbox when the mailbox owner runs the command.

For information about the parameter sets in the Syntax section below, see Syntax.

Get-MailboxFolder [-Identity <MailboxFolderIdParameter>] <COMMON PARAMETERS>
Get-MailboxFolder -GetChildren <SwitchParameter> [-Identity <MailboxFolderIdParameter>] [-MailFolderOnly <SwitchParameter>] [-ResultSize <Unlimited>] <COMMON PARAMETERS>
Get-MailboxFolder -Recurse <SwitchParameter> [-Identity <MailboxFolderIdParameter>] [-MailFolderOnly <SwitchParameter>] [-ResultSize <Unlimited>] <COMMON PARAMETERS>
COMMON PARAMETERS: [-DomainController <Fqdn>]

This example retrieves the Inbox folder in Tony's mailbox. The Identity parameter is supplied in the format of <Mailbox Identity>:<Folder>.

Get-MailboxFolder -Identity Tony:\Inbox

This example returns the root folders in Tony's mailbox. The Identity parameter is supplied in the format of <Mailbox Identity>.

Get-MailboxFolder -Identity Tony 

This example returns the first level of mail folders in Tony's mailbox.

Get-MailboxFolder -Identity Tony -GetChildren -MailFolderOnly

This example returns information about all the subfolders under Inbox in Tony's mailbox.

Get-MailboxFolder -Identity Tony:\Inbox -GetChildren

This example returns all levels of folders under Inbox in Tony's mailbox.

Get-MailboxFolder -Identity Tony:\Inbox -Recurse

If the mailbox isn't specified, the cmdlet returns the specified folders in the mailbox of the mailbox owner currently running the command. This command checks that the mailbox specified in the Identity parameter is a valid Exchange mailbox before retrieving the requested folders. The cmdlet returns all folders if the MailFolderOnly parameter isn't specified.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Mailbox folders" entry in the Recipients Permissions topic.

 

Parameter Required Type Description

GetChildren

Required

System.Management.Automation.SwitchParameter

The GetChildren parameter specifies whether to return only the first level of subfolders under the specified parent folder. You can't specify both this parameter and the Recurse parameter at the same time. The default value is $false.

Recurse

Required

System.Management.Automation.SwitchParameter

The Recurse parameter specifies whether to return the specified parent folder and all of its subfolders. You can't specify both this parameter and the GetChildren parameter at the same time. The default value is $false.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

This parameter is available only in on-premises Exchange 2013.

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that retrieves data from Active Directory.

Identity

Optional

Microsoft.Exchange.Configuration.Tasks.MailboxFolderIdParameter

The Identity parameter specifies the mailbox and the folder that the command returns information about. If the folder isn't specified, the command returns information about folders in the root hierarchy of the specified mailbox. You can specify values in the following format: <Mailbox Identity>:<Parent>

Valid values for <Mailbox Identity> include:

  • GUID

  • ADObjectID

  • Distinguished name (DN)

  • Domain\username

  • User principal name (UPN)

  • LegacyExchangeDN

  • SMTP address

  • Alias

  • Store object ID of the parent folder

Values for <Parent> can be both the store object ID and a path string such as \Inbox\Personal.

MailFolderOnly

Optional

System.Management.Automation.SwitchParameter

The MailFolderOnly parameter specifies whether to return only the mail folders in the specified mailbox. The default value is $false.

ResultSize

Optional

Microsoft.Exchange.Data.Unlimited

The ResultSize parameter specifies the maximum number of settings to return. If you want to return all settings that match the command, use unlimited for the value of this parameter.

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.

 
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft