Error executing Move-PublicFolderBranch.ps1

This issue occurs when you try to move a lot of Public folders at once with move-PublicFolderBranch.ps1 Script in Exchange 2013.

WARNING: An unexpected error has occurred and a Watson dump is being generated: The call to’net.tcp://contoso.local/Microsoft.Exchange.MailboxReplicationService contoso.local (15.0.1104.4caps:1FFF)’ failed. Error details: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation ‘ValidateAndPopulateRequestJob’. The maximum string content length quota (262144) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader..The call to ‘net.tcp://contoso.local/Microsoft.Exchange.MailboxReplicationService td-contoso.local(15.0.1104.4 caps:1FFF)’ failed. Error details: The formatter threw an exception while trying to deserialize the message: Error in deserializing body of request message for operation ‘ValidateAndPopulateRequestJob’. The maximum string content length quota (262144) has been exceeded while reading XML data. This quota may be increased by changing the MaxStringContentLength property on the XmlDictionaryReaderQuotas object used when creating the XML reader..
+ CategoryInfo          : NotSpecified: (:) [New-PublicFolderMoveRequest], CommunicationErrorPermanentException
+ FullyQualifiedErrorId : Microsoft.Exchange.Net.CommunicationErrorPermanentException,Microsoft.Exchange.Management.RecipientTasks.NewPublicFolderMoveRequest
+ PSComputerName        : contoso.local

I checked almost everyware but could not find a solution to this. No clue were this MaxStringContentLength property can be changed.

Finaly I stumpled on the MsExchangeMailboxReplication.exe.config located under “C:\Program Files\Microsoft\Exchange Server\V15\Bin”

blog

I went there to edit some values which were already correct , then I used ctrl + F to search for the value “262144” and Voala! Found that the MaxStringContentLength is actually there. So I give it a try and changed the value to 8388608, I assume that the value needs to be even of 2. All other values in this config are. So 8388608 is 32 times 262144. There two rows were MaxStringContentLength should be changed. Use find.

Saved the config file, restarted MsexchangeMailboxReplication service and Exchange Host service.

After that the script run without errors and the move was Successful!

This was “I feel lucky troubleshooting blind shot” 😀

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s