Jan 4 2018

The trust relationship between this workstation and the primary domain failed

I had an issue when trying to logon to one of our servers. After providing my credentials I received the below error.

All we needed to do was to reboot the server and I was able to RDP and login again. What caused the issue is not known as yet.

Jan 2 2018

The InnerException message was ‘Maximum number of items that can be serialized or deserialized in an object graph is ‘2000000’.

This was quite an interesting error for a mailbox I tried to migrate from Exchange 2013 to Exchange Online. The mailbox synced to 95% and I received the below error after I tried completing the batch.

Error details: The formatter threw an exception while trying to deserialize the message: There was an error while trying to deserialize parameter http://tempuri.org/:ISourceFolder_EnumerateChanges2Result. The InnerException message was ‘Maximum number of items that can be serialized or deserialized in an object graph is ‘2000000’.

The key to this error is the object graph limit that is set in the MsExchangeMailboxReplication.exe config file. To resolve the issue do the following:

  1. Logon to your on premises Exchange CAS servers that you use as the proxies for migrating mailboxes to EOL. (In my case this was Exchange 2013)
  2. Open Notepad as an administrator
  3. Browse to C:\Program Files\Microsoft\Exchange Server\V15\Bin (or your Exchange installation path) and open the MsExchangeMailboxReplication.exe config file
  4. Hit ctrl + f in Notepad and search for maxItemsInObjectGraph (there are two entries and I had to change both values)
  5. You want to increase the number in these strings:   <dataContractSerializer maxItemsInObjectGraph=”20000000″/> This is what the original looks like below.
  6. Restart the mailbox replication service on all the servers where you have changed the value.
  7. If the migration failed, then delete the migration job and restart it. You should not have the error again.
  8. Change the strings back to default using the above steps after you migrated the affected mailboxes for which you received the above error.

Here’s what the entries in the config file look like before any changes were made:


<behavior name=”MrsProxyServiceBehavior”>
<serviceDebug includeExceptionDetailInFaults=”True” />
<serviceAuthorization serviceAuthorizationManagerType=”Microsoft.Exchange.MailboxReplicationService.MRSProxyAuthorizationManager, Microsoft.Exchange.MailboxReplicationService.ProxyService, Version=, Culture=neutral, PublicKeyToken=%%%%%%%”/>
maxConcurrentInstances=”200″ />
 <dataContractSerializer maxItemsInObjectGraph=”20000000″/>
<behavior name=”MrsProxyEndpointBehavior”>
 <dataContractSerializer maxItemsInObjectGraph=”2000000″/>

Nov 23 2017

Reset the Google Authenticator plugin in WordPress after your phone has been lost or stolen

Unfortunately bad luck struck as my phone decided to stop making and receiving calls. After trying numerous ways to get it resolve a factory reset was needed. Of course I forgot about the Google Authenticator application on the phone which I use to access various services and managed to lock myself out of my Word Press websites.

Here are the steps to remove the Google Authenticator prompt when trying to logon to your Word Press websites that are protected with 2 step verification:

  • Login to your web server using FTP or the control panel details supplied by your ISP.
  • Browse to public-html 
  • Browse to wp-content 
  • Click on plugins
  • Rename the folder “google-authenticator” to “google-authenticatorold”
  • Open your web browser and type in your URL to get to the Word Press admin site i.e. www.yourdomain.com/wp-admin
  • The Google Authenticator field will now be removed and you can now login with your username and password
  • Go to plugins and delete the Google Authenticator plugin
  • Now search for and re-install the Google Authenticator plugin
  • Remember to activate the plugin, browse to your user in Word Press and scan the QR code to setup the 2 step verification on your phone
  • Logout and browse to the admin login page again. You should now be able to login using Google Authenticator again

Mar 14 2017

Origin download speeds are very slow

I noticed recently that game downloads and game updates in Origin is very slow. To give you an example, usually on my internet connection I would get an average download speed of 1.5MB per second but recently it averaged at 44kb per second.

After some searching on the internet I could not find a proper solution as most solutions on the net was completely bonkers or just did not make any technical sense. I then decided to scratch around in the Origin client to see if a setting might be causing the slow download speeds. And what do you know, it was a setting in Origin that caused the issue. See the steps below on how I resolved the slow download speeds in Origin. (I still don’t know how the setting got enabled in Origin though)

  1. Open your Origin client and login.
  2. At the top left, click on Origin.
  3. In the drop down menu click on “Application Settings”.
  4. At the top, now click on “Diagnostics”.
  5. Look for “Troubleshooting” and make sure that “Safe mode downloading” is NOT on.
  6. Start your game or update download you will see your download speeds increase to what it used to be.

Below is a screenshot of the setting turned off. I still don’t understand how EA support staff did not once mention the above to their clients on their support forums that I could find.

Origin safe mode downloading setting screen shot

Origin safe mode downloading setting screen shot

Note I did this on the client version Version – 0 but it should work for you in earlier or later versions too, but then again thing might change in the future 😉

Feb 13 2017

This operation requires a unique source object, but multiple objects have been found. Please remove any wildcard characters and check the data source for corruption.

You receive an error as per below when trying to restore a user’s mailbox in Exchange from a Recovery Database:

This operation requires a unique source object, but multiple objects have been found. Please remove any wildcard characters and check the data source for corruption.

I’m currently busy with a hand over at work and the engineer that will be taking over from me ran into this error when trying to restore a user’s mailbox. The Recovery Database has been created and the data has been restored to the database. The database is mounted and he was trying to run the below from the Exchange management Shell:

Restore-Mailbox -Identity “UserSurname, UserName” -RecoveryDatabase RecoveryDB -RecoveryMailbox “UserSurname, UserName” -TargetFolder RestoredEmail

He then received the error as another user in the restored database has the same Name and Surname. To get around that you need to do the following:

  1. Open the Exchange management Shell.
  2. Run: Get-MailboxDatabase -id RecoveryDatabaseName | Get-MailboxStatistics | FL > pathToYourTextFile.txt (This will dump the data in a list format)
  3. Hit Enter to export the Mailbox Statistics results to the text file.
  4. Open the text file and hit ctrl+F to open the search function.
  5. Search for the user you are trying to restore.
  6. Make a note of the user’s MailboxGUID as you will use the MailboxGUID in your restore cmdlet.
  7. Run: Restore-Mailbox -Identity “The Mailbox GUID You got from step 6” -RecoveryDatabase RecoveryDB -RecoveryMailbox “UserSurname, UserName” -TargetFolder RestoredEmail

Your restore will now copy the user’s data from the Recovery Database to the mailbox of the user as specified in your cmdlet.

Jan 10 2017

Removing mail with the same subject from the Exchange Queues

Sometimes you need to remove thousands of e-mails in your Hub Transport server queues. We see this every now and then with mail storms from an application that went off the rails or maybe with 2 mailboxes sending each other auto replies causing a mail loop.

There’s a few ways to stop the mail storm before removing the mail items in your Exchange queues but that is not the scope for this article. If you are ever in the situation of thousands of mails queued on all your Hub Transport servers then the below cmdlet should help you to quickly remove those mails from the queue. (Obviously do this with mails that are not classified as normal business or valid mail i.e. auto response loops)

  1. Get-TransportServer HubTransportServerName| Get-Queue | Get-Message -ResultSize unlimited | where {$_.Subject -eq “Paste the subject you need removed here.”} | Remove-Message -WithNDR $False

a better way might be #2 below if you don’t want to confirm deletion and have to run it across all your Hub Transport Servers: (Thanks to Clinton Hardenberg for the updated cmdlet)

2. Get-TransportServer HTServer0* | Get-Queue |where {$_.MessageCount -gt 25} | Get-Message -ResultSize unlimited | Where {$_.Subject -eq “Paste the subject you need removed here.”} |            Remove-Message -WithNDR $False -Confirm:$false

The 2nd cmdlet will use the 1st part of your server names i.e. if you have HT01, HT02 and HT03 then use HT0* to remove the mail across all your HT servers. The -WithNDR $False will delete the mail and not send an NDR which is important in this case as you will just increase the number of mails when it’s set to $True. -Confirm $False negates the need to select “A” and confirm that you want to remove the mail items from the queues.

There are other parameters you can use to define which items you want to remove but in the above examples we use the Subject as we deal mostly with mail storms by Subject as they are usually


Nov 14 2016

Error: MigrationRecipientNotFoundException: A recipient was not found for “mailboxName”

If you received the error “Error: MigrationRecipientNotFoundException: A recipient was not found for “mailboxName”” when migrating a mailbox to Exchange Online (Office 365) then check for the below AD attributes.

The error from the Exchange Admin Portal on Office 365:


Open the on premises Exchange Management Console and search for the user. You should see the mailbox shows it’s a Linked Mailbox instead of a Remote Mailbox as expected:


To rectify this, open AD Attribute Editor and browse to the msExchRecipientTypeDetails attribute. You should see the below:


Change the Value of 2 to 1 for msExchRecipientTypeDetails as you need the mailbox to show as a user mailbox on premises before trying to migrate it to Exchange Online.


Wait for replication, remove the move request in Exchange Online via Shell and then migrate the mailbox to Exchange Online

Nov 14 2016

Unable to access or move a mailbox receiving error the mailbox is disabled when it’s not

If you ever try to move a mailbox and you receive an error that the mailbox is disabled but you have checked and the mailbox is not disabled then try the following:
(other errors we received was trying to access the mailbox using Outlook Web App and stating it’s disabled or from Outlook stating you need to connect to Exchange)

  • Verify that the mailbox is indeed not disabled. If not proceed to the next steps
  • Open Exchange Management Shell and run: Set-CASMailbox -Identity mailboxSMTPAddress@domain.com -MAPIEnabled $False
  • Wait for replication
  • Run: Get-CASMailbox mailboxSMTPAddress@domain.com (check that it shows MAPI Enabled is false)
  • If MAPI Enabled is false run: Set-CASMailbox -Identity mailboxSMTPAddress@domain.com -MAPIEnabled $True
  • Wait for replication
  • Run: Get-CASMailbox mailboxSMTPAddress@domain.com (check that it shows MAPI Enabled is true)
  • Try an connect to the mailbox using Outlook, Outlook Web App or moving the mailbox.
  • If you still get an error try running: Clean-MailboxDatabase DatabaseNameWhereTheMailboxIsHomed (we actually had to run this for one of the mailboxes giving us issues)

This should sort out the issue for you.

Nov 14 2016

VB.Net application unable to connect to some Exchange 2010 mailboxes

We had an interesting issue last week where a Visual Basic .Net application could connect to some mailboxes but could not connect to other mailboxes on Exchange 2010. The application uses MAPI to connect to the mailboxes.

We were however able to access the affected mailboxes using Outlook and with the MFCMAPI tool from the application server. We moved the affected mailboxes to other servers and databases but the application could still not connect to the affected mailboxes. We then added our CAS Array name and IP in the application server’s host file and checked the Exchange RCA logs.

We could not see any connections from the application server to the affected mailboxes but could see connections to the working mailboxes in the RCA logs.

The error from the application were as below but note that it was misleading as it stated it authenticated, connected but could not expand the mailbox store.

ProcessMails() LogonExchangeMailbox Success
Date Time : 2016-11-07 06:30:17
Error : Error in IMAPISession::OpenMsgStore: MAPI_E_FAILONEPROVIDER
ulVersion: 0
Error: The information store could not be opened.
Component: MAPI 1.0
ulLowLevelError: 0
ulContext: 649
Source : at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack)
at MailReader.Form1.ProcessMails(String sToDoFolder, String sDuplicateToDoFolder, String sTiffFolder, String sDuplicateTiffFolder, String sExchangeServer, String sInboxUser, String sInboxName, Int32 maxItems, Int32 branchRef)

We then resolved the issue by doing the following:

  • Opened Exchange Management Shell
  • Ran this cmdlet against a working mailbox: get-mailbox mailboxSMTPaddress@domain.com |fl *legacy*
  • Made a note of the output
  • Ran the above cmdlet against a non working mailbox and compared the outputs.

The output of the working mailbox:

ServerLegacyDN : /o=yourdomain/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MailboxServerName
LegacyExchangeDN : /o=yourdomain/ou=exchange administrative group (fydibohf23spdlt)/cn=recipients/cn=MailboxAlias

The output of the non working mailboxes:

ServerLegacyDN : /o=yourdomain/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=MialboxServerName
LegacyExchangeDN : /o=yourdomain/ou=SomeOU/cn=recipients/cn=MailboxAlias

The fix:

We then used AD Attribute Editor to change the LegacyExchangeDN on non working mailboxes (LegacyExchangeDN : /o=yourdomain/ou=SomeOU/cn=recipients/cn=MailboxAlias) to reflect the working mailboxes’ LegacyExchangeDN (LegacyExchangeDN : /o=yourdomain/ou=SomeOU/cn=recipients/cn=MailboxAlias)

Waited for replication and the application could once again access all the required mailboxes.

Oct 21 2016

Logging in to a shared mailbox using IMAP on Exchange 2010 using Outlook or a 3rd party application

I keep forgetting the correct way in which the username needs to be used when using IMAP to logon with your account to a shared mailbox.

To logon to a shared mailbox you need to provide the domain first then / and then the account you want to authenticate with and another / then the shared mailbox you are trying to access. Below is an example.