Questions tagged [tf-cli]

tf.exe is the command-line client for Team Foundation Server

The default command-line client for Team Foundation Server Source control. You can use version control commands to do nearly all tasks you can do in Visual Studio, and also several tasks that can’t be done in Visual Studio. You can use the tf.exe tool to run version control commands from a command prompt or within a script.

See:

Other useful commandline tools for TFS include (from the Team Foundation Server Power Tools), tfsbuild and and .

118 questions
3
votes
2 answers

TF: Checkin only selected files instead of all Pending changes while merging

Using tf.exe, the command line utility for TFS, I've automated the process of merging two branches using tf.exe in a batch file in simple steps: TF Get... /Recursive TF Merge... /Recursive However, while checking in the changes, "TF Checkin"…
Farrukh Waheed
  • 2,163
  • 2
  • 29
  • 59
3
votes
3 answers

TFS equivalent of "hg cat"?

There is one file I want to get from TFS. In the same situation in Mercurial I would just do hg cat. Is there an equivalent to hg cat in TFS? I was trying the following command line: tf get $/dev/components/log.zip But it fails with: No appropriate…
mark
  • 59,016
  • 79
  • 296
  • 580
3
votes
1 answer

Using TF.exe with Team Foundation Service?

We're moving our build from Team Build (Team Foundation Service) to a local build machine using Jenkins CI for build. However, we still want to use the Cloud for Source Control. So now we need to access the cloud TFS to get the latest build. Jenkins…
AlexK
  • 493
  • 8
  • 20
2
votes
1 answer

tf.exe folderdiff diffing files in specific folders

I want to be able to diff all my app.config files that resides in folders called MessagingService. I have read the documentation on the tf.exe about 50 times now, and I can't understand that the syntax should be different than: tf.exe treediff…
Snorre
  • 955
  • 1
  • 5
  • 18
2
votes
1 answer

How to pull an entire project from TFS

While sifting through this page I figured I'd ask if anyone knows how to download an entire project using the tfs command line utility. It doesn't look like I need the get command... but I can't find anything that looks like what I want. If I have…
213897
  • 1,561
  • 4
  • 15
  • 16
2
votes
1 answer

TFS Commandline Help : Deny CheckIn for a branch

I'm trying to find tf.exe command to deny checkin permission for a branch. I do this manually by Right Clicking the branch -> Properties -> Security Tab -> Select the Group "[mytfs]\Contributers" and selecting Deny "Check In" checkbox. After a build…
Sanjeev
  • 673
  • 4
  • 10
  • 19
2
votes
1 answer

TFS command for switching workspace

Is there a command to switch the active workspace from tf.exe ? I have searched here and here. But I do recall, I've seen it some time ago.
igorc
  • 2,024
  • 2
  • 17
  • 29
2
votes
2 answers

OAuth usage in tf.exe

I'm trying to run a powershell script as a build step for TFS2015. In the script I have tf history /r /noprompt /loginType:OAuth /login:.,$env:SYSTEM_ACCESSTOKEN, as I saw in this answer, but I get the following error: TF10120: The value OAuth is…
liorda
  • 1,552
  • 2
  • 15
  • 38
2
votes
1 answer

Use "tf shelvesets" to get shelvesets sorted by creation time?

Using tf shelvesets, I get a list of all the the shelvesets I've created. The problem is, they are sorted alphabetically. Is there any way to use tf to get a list of shelvesets sorted by creation date? I want to be able to easily see the (few) most…
bsinky
  • 515
  • 5
  • 15
2
votes
1 answer

tf workspace collection url changed

I migrated TFS from an old server "OLDMACHINE" to a newone "NEWMACHINE". TFS is shutted down on OLDMACHINE. Now I want to update my different URLs on developpers computers. For my git clones, the command is : git remote set-url origin…
2
votes
1 answer

Batch file command to get TFS advanced get specific version with Latest version

Please let me know the Batch file command to "get TFS advanced get specific with latest version" Advanced --> Get Specific Version --> Type "Latest Version" --> Overwrite --> Get
Mey
  • 21
  • 1
  • 3
2
votes
3 answers

TFS: Cloaking multiple elements from command line

Suppose we have a folder $/myProject/myFolder on the TFS server which contains some files and sub-folders. Is there any possibility to iteratively cloak every element under this folder (not recursively) using the tf.exe command line utility? I can't…
Rickson
  • 1,040
  • 2
  • 16
  • 40
2
votes
2 answers

Given a TFS changeset, how can I find what work item(s) it is linked to?

It's easy to see what changesets are linked to a given work item. But is it possible, given a changeset, to find out what work item(s) it is linked to?
smartyollie
  • 161
  • 3
  • 9
2
votes
1 answer

Why does tf merge /candidate doesn't show pending merges while Visual Studio does?

When I list my pending merges between Branch1 and Branch2 on Visual Studio it shows them. But If I use tf it doesn't. The command I am using to list my pending merges with TF is: tf merge /candidate Branch1 Branch2 And I get There are no changes…
Dzyann
  • 5,062
  • 11
  • 63
  • 95
2
votes
1 answer

Running TFS commands with arguments in powershell

Hi I am trying to run the "tf get" command through powershell but i always get a unexpected token error when it reaches the arugments. I was following the instructions from this post TFS commands in PowerShell script the line where the error is…
user3351901
  • 107
  • 1
  • 3
  • 12