Upgrading to TFS 2012 with service accounts from an old domain

If you’re tfs server has been moved between domains or have had users in trusted domains that don’t exist anymore, it might be advisable to run before the upgrade:
TfsConfig.exe identities
If you don’t see any service accounts from strange old domains in there you are probably in there clear, but if you do see old users please take the time to remove them.
The end result of not doing so, is the following surprise from the Microsoft.TeamFoundation.Warehouse.OlapCreator.AddAcountsToRole method during the upgrade of the configuration database:
TF255356: The following error occurred when configuring the Team Foundation databases: TF400711: Error occurred while executing servicing step Upgrade warehouse for component WharehouseDev10ToDev11FinalConfiguration during FinishInstallUpdates: The trust relationship between the primary domain and the trusted domain failed.
The reason this method crashes is because its trying to give rights to that user, but can’t retrieve it from your active directory. If you found this article based on the error message above, you might have noticed your TFS_Configuration database isn’t recognized by either the installation of the AT or by the upgrade wizard. This might be a nice opportunity to point out your practice and preparations on restoring from backups wasn’t in vain. After removing the old service accounts listed on the top you can re-try the upgrade. If you don’t have a backup don’t try removing the users using the command line, you will damage a lot more if you try to. Calling Customer support might be a better idea.