Thursday, January 29, 2015

Public Folders, Exchange 2013

Are a massive pain in the ass...

So you have the main mailbox, assigned the Primary Hierarchy, and all mailboxes beyond that are assigned the Secondary Hierarchy.
If a folder resides in anything but the Primary Hierarchy, you will NOT be able to add subfolders to it through Outlook.
You'll get this window:
The connection to Microsoft Exchange is unavailable.  Outlook must be online or connected to complete this action.









You'll still be able to add folders through the EAC, but this is a massive administrative pain if your users are adding subfolders all the time.
You will be able to move data like emails and tasks to it if its in a Secondary Hierarchy though.

If you have a folder tree like this:
Root public folder
                    ∟Team folder
                                          ∟ Folder for Stuff
                                          ∟ Folder for Stuff
                                          ∟ Folder for Stuff

That continues on and on for different root public folders, this is how you have to have them assigned on the back end:
Root public folder(primary hierarchy)
                    ∟Team folder (primary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)
                                          ∟ Folder for Stuff (secondary hierarchy)

This way, you're moving the actual data to another PF-Mailbox and allowing the Primary space to create other useable folders through outlook.
In the Folder for Stuff, you'll be able to add emails, tasks, etc, just not subfolders.

If you've migrated from a previous version of exchange and didn't map out your public folders like this prior to the move, here are some powershell scripts you'll need.  You'll need to be in the exchange shell, running as admin and logged in with a user that has exchange administration rights.

I'd just CD to the location of scripts since you'll be running a number of scripts.  The scripts are located in program files\Microsoft\exchange server\

so you'll need:
.\move-publicfolderbranch.ps1
This script moves the folder you select along with everything underneath it.  If you're moving a large folder, it will lock down all public folders until its done.
FolderRoot:
the location of the folder, if its a root folder, just type its name, if its not, type \home folder\sub folder\sub folder\etc until you get to the folder you're going to move.  If you use the EAC to find the public folder, drill down to as far as you need and you can copy the path/paste it into powershell with a right click.

TargetPublicFolderMailbox:
The pf-mailbox you're moving to (the secondary hierarchy folder)

To see the statistics:
get-publicfoldermoverequeststatistics -identity \publicfoldermove

Before you move on to the next folder move you have to remove the finished job (there might be a better way to go about this, but I'm new to powershell/coding in general)
remove-publicfoldermoverequest -identity \publicfoldermove

If you only want to move the root folder:
new-publicfoldermoverequest

You'll be able to select the folders you want to move with this command.

No comments:

Post a Comment

Samsung refrigerator not making ice

How I got my stupid fridge to work again. Normally, I press/hold the blue button till it chimes. Well that didn’t work this time. Darn. I re...