Change UserName for a TFS Workspace - tfs

We recently changed domains for our entire network, and I am trying to find a way to migrate my TFS workspace from my old Domain\Username to the new Domain\Username without losing any pending changes.
Note also that I need a solution to accomplish this via the command line, as Visual Studio won't let me access the old workspace from the old domain.

See the MSDN article about the Workspaces Command. You can invoke tf workspace with an argument /updateUserName. That should do the trick.

I just migrated my TFS server from my old domain to a new domain because my organization had a company name change. After the migration, I had to overcome several issues and eventually I was left with the development team getting TFS14045 error messages. The fix to this problem was simply having the developers issue the following command from their Visual Studio command prompt.
tf workspaces /updateUserName:OLDDOMAIN\olddomainusername /s:http://[tfsserver]:8080/tfs
I found that if multiple developers had logged into that workstation and created workspaces with visual studio that I had to issue this command for each domain account until I get them all. After I did this procedure I was then able to remove their corresponding records form the tbl_identity table of the TFS_Configuration database on my TFS server so that I wouldn't then also have to look at duplicate accounts for the same person (one for their old domain account and one for their new domain account) inside my TFS collection. Leaving this record in place also created another error that you will get if a developer breaks the build and TFS tries to create a auto generated work item for that developer to fix the build. If both the old domain account and the new domain account is present in the TFS collection (recorded in the tbl_identity table...) then TFS will not know which user account to use when making the work item for the broken build.
Good luck and I apologize if this is too rambling to read but I am in a hurry and I hate reading posts that leave out detail ;-)

Related

Newly created iterations and areas are not synched

I am using TFS 2013 update 4:
Scenario:
Add a new iteration from the administration page of a project.
Go to the project Dashboard create a new work item.
Newly created ierations and areas are not shown in the relative dropdowns.
Steps taken:
Checked the server for errors in the event viewer, no issues.
Check the 'Visual Studio Team foundation Job Agent' running with no issues under the TFS admin user.
The newly created iteration exists in the collection database table 'tbl_nodes' and in the 'TFS_Warehouse' Database.
Checked the Jobs on the database and forced them to start, did not solve it.
What I was not able to do is figure out which table exactly the TFS is querying the nodes from, afterall the Stored procedures are encrypted.
Amemdment:
**the newly created iterations exist in the 'tbl_nodes' but does not exist in 'TreeNodes' table.
Since newly created iterations and areas are both in database. Try to restart Team Foundation Background Job Agent service to force synchronization in TFS server.
If it's still not help, give a try with rebooting the server, which may do the trick. You can also take a look Mark's solution in this similar issue Newly created TFS 2010 iteration not visible

TFS in Visual Studio Online

I used before free TFS from Visual Studio Online. I worked fine, I added some projects to TFS and did check-in and check-out without problem. But now it just stop working. When I try to check-in new projects, I get the following error:
The following issues were encountered during check in: TF10169:
Unsupported pending change attempted on team project folder $/Code.
Use the Project Creation Wizard in Team Explorer to create a project
or the Team Project deletion tool to delete one.
What is Project Creation Wizard? How I can run it? And what is happened with my account? I see the message:
Your account is an Early Adopter account. In 31 days your account will
revert to a standard account.
Maybe that's why it's not working anymore?
You cannot create or delete folders at the top-level of the source tree. (Eg, $/Code).
The top level of the source tree is reserved for Team Projects, which must be created and deleting specially. If you want to delete $/Code, you will need to undo your pending change that deletes it and instead delete it using the Project Creation Wizard or the TfsDeleteProject command.

Delete a collection from TFS

I want to use a free tfs account for a sample project. So i created a free account on visualstudio.com and created 2 collections. And i want delete one them but i cannot delete it.
There is no any members in the collection. It doesn't allow me to delete. As you see on the screenshot, delete button is disabled. Also Is there any way that if i've an admin account, is possible to change or delete collections from visual studio?
I'm not sure how/if it applies to free TFS versions, but the following link shows how to delete Team Project Collections in general. Looks like doing it via command line tool is the way to go.
https://rules.ssw.com.au/do-you-know-how-to-delete-a-team-project-collection
Here is the main part:
On TFS server, open Administrative Command Prompt and change to TFS Tools Directory.
%programfiles%\microsoft team foundation server[versionnumber]\tools
Type the command:
TFSConfig Collection /delete /collectionName:[COLLECTION NAME]
You're mixing collections and team projects. You cannot create a collection in Team Foundation Service as of now. That may or may not change in the future. When you sign up, there is one collection created for you and that one will contain your team projects and you will need to live with that one. If you have a need to have another collection then you can sign up under another account. You can however delete team projects but not from the web UI. You will need to use the command line tool DaveShaw gave a link for. You can also check out the blog post below:
How to delete a team project from Team Foundation Service (tfs.visualstudio.com)
You look like you are trying to deleted a "Team" from a "Team Project"? You have to have at least one "Team" in a "Team Project", and that will have the same name as the "Team Project".
If you are wanting to delete the entire "Team Project" (containing all the Work Items, Source, Builds, etc), you can do it using the tfsdeleteproject command line tool.
Even we had similar issue. Unfortunately we had deleted a Collection DB without Stopping and Detaching the collection from TFS admin console in TFS 2018. Later we tried to detach the collection, but no luck. Initially we had ignored this issue since it was test TFS collection and that too in QA server. Later during up-gradation to Azure DevOps 2019 server we faced issue with Existing Deployment option. we couldn't complete the upgradation. we followed below steps to fix the issue:
**1. Restored the VM/QA TFS server with VM snapshot backup created before upgradation.
Run below command to remove the deleted collection from TFS Config DB.
"TFSConfig Collection /delete /collectionName:[COLLECTION NAME]"
Stop TFS services and done upgradation to Azure DevOps Server 2019 successfully.**

Restore all security groups of the TFS 2010 collections after applying the TFSConfig repair command

We've lost our TFS and domain servers. TFS was configured to use domain accounts. We could resotre only the TFS Project Collection databases and thanks to the "TFSConfig repair" command, we finally attached them to a new TFS instance.
But all of the default security groups for repaired projects are lost (except the administrators). For example we don't have "Contributors" group anymore.
Now we want to restore these standard groups. Maybe it's possible to fix it by applying the default TFS "project proccess templates" on all existing projects and collections again.
Is there any way to address it?
As you lost the Domain server you have to follow the Move User and Service Accounts chapter of the "Move Team Foundation Server from One Environment to Another" procedure.
By the way, there's no such feature as reapplying a process template on an existing Team Project.
Have you tried to recreate at least one group that you lost? Only to know if that is working (maybe TFS will return an error because the group still exists in the database but it's not shown for whatever reason) ?
One last thing: check the TFS Scheduler Windows Service is running on the TFS Server and look for errors in the Windows Event Log.

TFS 2008 to TFS 2010 migration with domain move

I have installed and configured TFS 2010 on a Win 2008 server. I have tested the migration and everything seems o be working fine. I have one issue with the Domain move though.
I am trying to use TFSCONFIG IDENITIES /change command to map the Users in old domain to new domian, but unfortunately the new domain accounts have been added to the TFS group. Hence, I caanott use the Identities /change command.
I am still trying to figure out what needs to be done in order to sync up the accounts b/w two domains. What are my options in this situation? Can I just uninstall and re-install TFS 2010. Would that help me sync up the account names b/w two domains? Please advise
There is extensive guidance available on the different supported upgrade scenario's.
Probably the easiest way to do the upgrade is to install TFS2010 over the 2008 version and then do a domain migration. It looks like the issue you're facing is that you added the new account members, instead of migrated the old members to the new ones. I haven't been in that scenario before, you could try removing the new accounts and then migrating, or using the TFS integration tools to migrate all data for one user to another user.
If you still have a backup available, or if the TFS 2008 server is still there, I suggest re-doing the migration, however painful that may be, it will be the safest way to get everything to work again.
Finally there are the The TFS Integration Tools can be used to migrate from one TFS instance to another, they don't migrate everything, but will migrate the most important things.

Resources