TechNet Magazine > Home > Tips > Exchange Server 2007 >  Use the Exchange Management Shell to Work with ...
Tip: Use the Exchange Management Shell to Work with Managed Folders

In the Exchange Management Shell, you can use the following cmdlets to work with managed folders.

New-ManagedFolder (Creates a new managed custom folder)
Syntax:
New-ManagedFolder -Name 'ExchangeName'
-FolderName 'Pending OutlookName'
-StorageQuota 'Limit'
-Comment 'Comment'
-MustDisplayComment <$false|$true>

Usage:
New-ManagedFolder -Name 'Pending Approval'
-FolderName 'Pending Approval'
-StorageQuota '500000KB'
-Comment 'All messages pending approval should be placed in this
folder.'
-MustDisplayComment $true


Get-ManagedFolder (Displays a list of all managed folders or a specified managed folder)
Syntax:
get-ManagedFolder [-Identity 'FolderIdentity' | -Mailbox
'MailboxIdentity']
Usage:
get-ManagedFolder
get-ManagedFolder -Identity 'Pending Approval'
get-ManagedFolder -Mailbox 'cpand\tedb'


Tips RSS Feed
Set-ManagedFolder (Sets properties of managed folders)
Syntax:
Set-ManagedFolder -Identity 'FolderIdentity'
-Name 'ExchangeName'
-FolderName 'OutlookName'
-StorageQuota 'Limit'
-Comment 'Comment'
-MustDisplayComment <$false|$true>>

Usage:
Set-ManagedFolder -Identity 'Pending Approval'
-FolderName 'Pending For Approval'
-StorageQuota 'Unlimited'
-Comment 'Folder for messages pending approval.'
-MustDisplayComment $false


Remove-ManagedFolder (Removes managed custom folders)
Syntax:
Remove-ManagedFolder -Identity 'FolderIdentity'

Usage:
Remove-ManagedFolder -Identity 'Pending For Approval'


When you are working with mailboxes, you’ll often want to determine whether and how managed folders are being used. You can determine the managed folder configuration for a specific mailbox by using the following command line:
get-ManagedFolder -Mailbox 'MailboxIdentity'


Here MailboxIdentity is the name of the mailbox you want to examine, such as:
get-ManagedFolder -Mailbox 'cpand\tedb'

The output returned from this command is a list of managed folders (if any). To examine detailed information about custom folders applied to a mailbox, simply format the output into a table list as shown in the following example:
get-ManagedFolder -Mailbox 'cpand\tedb' | fl



Looking for More Tips?

For more Exchange Server tips, visit the TechNet Magazine Exchange Server 2007 Tips page.
For more Tips on other products, visit the TechNet Magazine Tips index.
Page view tracker