You can create the public folder in the Exchange interface and create the folders, but they will not be mail enabled until you do the following:
1. Enable the mail address (either by the GUI or through PowerShell)
2. Set the email address (either by the GUI or through PowerShell)
3. Disable the Address Policy
4. Most importantly (and only via PowerShell as far I can see), enable Anonymous users to Create Items in the folder (otherwise incoming emails cannot reside in the Public Folder).
The code to do this is straightforward, and turned into a script so that it is repeatable in the event of any changes in your plans (and also why do repetitive tasks in the GUI, when one script will do it all?!)
This line of PowerShell will enable Anonymous Create Item rights:
This line does the mail enabling, setting the address, and blocking Address Policy Enabling all in one go:
Note that the full path to the public folder is the folder heirarchy so something like this for a folder 3 levels down a tree called "Fred"
“\Root Folder Name\Second Level Folder Level\Fred”
and the Public Folder Name in this instance is just
So, if the fred PF alias was firstname.lastname@example.org your two lines of code would be:
Get-PublicFolder “\Root Folder Name\Second Level Folder Level\Fred” | Add-PublicFolderClientPermission -User Anonymous -AccessRights “CreateItems"
Set-MailPublicFolder "Fred” -EmailAddressPolicyEnabled $false -PrimarySmtpAddress “email@example.com"
My thanks to the following 2 blog entries for pointing the direction:
NB. use the code at your own discretion and please note that this was done in a single Public Folder Mailbox environment.