Creating an Exchange Public Folder Mailbox with PowerShell: A Step-by-Step Guide

Create Public Folders


Public folders in Microsoft Exchange serve as a foundation for shared access to messages, calendars, and files, allowing teams to collaborate efficiently. With the advent of PowerShell, managing these public folders has become more streamlined, enabling administrators to perform complex tasks with simple commands. Here's a step-by-step guide to creating a public folder mailbox using PowerShell, which is an essential first step before you can create public folders.

Step 1: Verify Permissions

Before you begin, ensure that you have the necessary permissions to create public folders in your Exchange environment. You may need to be assigned roles that grant you the ability to create mailboxes.

Step 2: Launch PowerShell

Open the Exchange Management Shell or connect to your Exchange Online session if you're working with Exchange Online.

Step 3: Create the Mailbox

To create a new public folder mailbox, use the `New-Mailbox` cmdlet with the `-PublicFolder` parameter. For example, to create a primary public folder mailbox named 'PF-01', the command would be:

New-Mailbox -Name PF-01 -PublicFolder


If you're creating a secondary public folder mailbox for load balancing purposes, the process is the same. Just ensure that the primary mailbox has already been created.

Step 4: Verify the Mailbox

To ensure that the public folder mailbox has been created successfully, you can use the `Get-Mailbox` cmdlet to retrieve information about the newly created mailbox and verify its attributes.

Get-OrganizationConfig | select RootPublicFolderMailbox
Get-Mailbox -PublicFolder

Step 5: Create Public Folders

To create Public Folder named "HR Services" within the Public Folder Mailbox "PF-01" and in the root of the Public Folder mailbox, use the below PowerShell cmdlet.

New-PublicFolder -Name "HR Services" -Path \

Step 6: Verify Public Folder Creation

To verify that the Public Folders are created in the Public Folder Mailbox, you can use 'Get-PublicFolder' cmdlet.

Get-PublicFolder -Recurse


By following these steps, you can effectively create a public folder mailbox using PowerShell, paving the way for organized and collaborative workspaces within your Exchange environment. Remember, the first public folder mailbox you create will be the primary hierarchy mailbox, containing the only writable copy of the hierarchy. Any additional mailboxes will be secondary and contain a read-only copy of the hierarchy.

For more detailed information on the parameters and examples of creating public folder mailbox and public folders, you can watch my YouTube video below.



Creating a public folder mailbox is just the beginning. With PowerShell, you can manage every aspect of your Exchange public folders, from setting permissions to migrating content, all with the power of simple yet powerful commands.
Previous Post Next Post