March 2011

You are browsing the site archives for March 2011.

Those of you familiar with Linux systems should know the very helpful “which” command which can tell you where exactly an executable that is in your PATH is located. The good news is, that a very similar command exists in PowerShell

> get-command tf

If the TFS exectuable is in your path, this gives you output of the form.

CommandType     Name                     Definition
-----------     ----                     ----------
Application     TF.exe                   C:\Program Files\Microsoft Visual Studio 9.0\Com...

But that’s not very helpful, is it? I mean, a quite important part of the path is cut off for crying out loud. So how do you get the FULL path?

> get-command tf | format-list

Name            : TF.exe
CommandType     : Application
Definition      : C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe
Extension       : .exe
Path            : C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\TF.exe
...

And there you go. It’s a bit more complicated than necessary, but at least it’s possible.

I always forget how to Rollback a Changeset, so here’s the command to do it:

First, make sure you got the Team Foundation Server Power Tools installed.

Then execute the following command:

tfpt rollback /changeset:<changesetnumber> "<workspace>"

so for example:

tfpt rollback /changeset:48745 "C:\Workspaces\XXXComplete"