Exchange OU picker

It came to my attention recently that in one of the Exchange 2013 environments I look after, when creating a new object (whether that’s a mailbox, distribution group or anything else) that requires you to choose an Organizational Unit (OU) for the new object to sit in, the following screen was appearing instead of the OU picker:

ou-picker

So there are more results that can be displayed… But also no items in the view.

This is because Exchange, by default, returns the first 500 items it finds that match any given criteria. For mailboxes this just means the first 500 in the organisation, and you can search for more. If you need to populate a tree, like in the example above, all list items have to be returned so that the tree view can be drawn properly. If your Active Directory domain has more than 500 OUs you’re going to run into this problem.

Fortunately the fix is simple: on all your Exchange servers that have the Mailbox role installed open the following file:

C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\ecp\web.config

And add the following text above the </appsettings> tag:

<add key="GetListDefaultResultSize" value="x" />

Just change x for a number that is slightly higher than the number of OUs you have in your domain, then restart the MSExchangeECPAppPool application pool in IIS.

You can find the number of OUs you have by running one of the following PowerShell statements:

(Get-OrganizationalUnit –ResultSize unlimited).Count

This can be run in the Exchange Management Shell. Or you can run:

(Get-ADOrganizationalUnit -Filter *).Count

In any PowerShell session where you have imported the ActiveDirectory module.

Unfortunately as the file you need to change is a core part of Exchange, each time you install a new CU you’ll have to re-apply this fix.

Share and Enjoy:
  • Digg
  • StumbleUpon
  • Technorati
  • del.icio.us
  • Twitter
  • blogmarks
  • HackerNews
  • Tumblr
  • Posterous
  • email
Bookmark the permalink. Follow any comments here with the RSS feed for this post.
Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Your email address will not be published. Required fields are marked *

This blog is kept spam free by WP-SpamFree.