add all mailbox user to public folder in office 365

Copper Contributor

Dear Forum,

did anyone have experienced adding all mailbox users to public folder in office 365?

we are using office 365 and we deployed public folder and we don't want to add user by manual to public folder, because we have around 600 mailbox users, so how we can add all users by script or command line?

thanks forum.

4 Replies
The first question is why public folders? You shouldn’t be deploying those as those are the thorn in Microsoft’s side trying to get rid of them. I wouldn’t want to start on something that really doesn’t have development support going forward.

Is this something new or an existing function you’re moving over?
Hello Peang,

I agree with Chris, please consider before you move forward with it.
To migrate using script please use Exchange Online PowerShell

New-Mailbox -PublicFolder -Name MasterHierarchy & New-Mailbox -PublicFolder -Name <Username>

Please see the step by step procedure documented here and let me know if you have any further question.

https://docs.microsoft.com/en-us/exchange/collaboration-exo/public-folders/create-public-folder-mail...
Yep, public folders in EXO is a kind of comes and goes story ^-^ Microsoft has tried to remove them from EXO, but they have to stop this idea due to the heavy use many organizations is still doing of public folders. The recomendation here is to replace the use of public folders and use SPO instead....by the way, to answer your question take a look at the following PS cmdlet: https://docs.microsoft.com/en-us/powershell/module/exchange/sharing-and-collaboration/add-publicfold...

It's intended to provide permissios access to a public folder so it should be enough for your scenario

You don't need to "add" users, simply adjust the "Default" permissions for the PF in question.