SharePoint: Create a content organizer rule with many content type aliases using PowerShell

Why would I want to add many content type aliases to a content organizer rule?

When creating a content organizer rule in SharePoint, the default is that the rule is only valid for a single content type. To get around this limitation, you can add other content type names to the field Aliases (also known as RoutingAliases), displayed as “List of alternate names” in the SharePoint editor.

Warning 1: If you want to add all content types, you simply need to add “*” (wildcard) as an alias. The code example below is a solution if you need many, but not all content types

echocardiogram for a- multiple sclerosis cialis.


Warning 2: Using this method also changes the content type of the document being routed, so if you need to keep the content type, you need to create one rule per content type
. My script below can still be useful to automatically create all the rules you need.

So, what’s the problem?

The aliases field is limited to 255 characters, which means that if you want to create one rule that will work with many content types in your solution, that is usually not possible, because the list of content types exceeds 255 characters.

How do I get around this limitation?

The suggested solution below automatically creates a new rule and adds content type names until the aliases field is full. When the field cannot hold any more content type names, the script starts creating a new rule.

The end result is one or more rules that do exactly the same operation, but for different content types, and as few rules as possible.

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.