Remove Version Control Pending Changes from TFS 2010

Every time when any user leave the IT department there are steps to remove pending changes and security permission from TFS version control. Below is the steps to remove any user changes and groups security permissions.

  • User who runs the command must be a member of TFS collection administrator group/ project administrators.
  • Open visual studio command prompt(2010)
  •  Use TF command to check user status [tf status /collection:http://[servername]:8080/tfs/[collectionName] /user:[Domain/userID] /recursive]
  • you will get all user pending changes, Now you need to Check the workspaces for this userID.
  • Use this command to get user workspaces [tf workspaces server:http://[servername]:8080/tfs/[collectionName] /owner:[Domain/userID]]
  • Use TF undo to remove all pending changes (make sure all these changes not needed any more there is no rollback for this operation).[tf undo /collection:http://[servername]:8080/tfs/[CollectionName] /workspace:[user workspace name];[User ID]  [source control path for file or folder] /recursive ]
  • Remove user workspace, do it for all workspaces [tf workspace /delete /collection:http://[servername]:8080/tfs/[CollectionName]  [user workspace name];[User ID]]
  • All user pending changes has been removed.

Enjoy it 🙂

Enhanced by Zemanta

Leave a Reply

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