title: What does "tf workspaces" do?
body: <p>I'm using tf.exe to perform TFS source control tasks - mapping folders, getting files. The current folder is mapped in a workspace, I've checked. The mapping is created programmatically, then tf is invoked.</p>
  
  <p>Whenever I run the code on a new machine, I'm getting the following message:</p>
  
  <blockquote>
    <p>Unable to determine the workspace. You may be able to correct this by running 'tf workspaces /collection:TeamProjectCollectionUrl'.</p>
  </blockquote>
  
  <p>If I perform that command, it clears things up and everything works from now on. However, what exactly does it do, and how can I do the same using TFS API?</p>
  
  <p>The docs say it "updates cached information about a user name or computer name change on the server that is running Visual Studio Team Foundation Server." I don't get it - where's the cache? What do they consider a computer name change?</p>
  
  <p>Calling Workspace.Refresh() or Workspace.Update() doesn't help.</p>