Along with VS, VSTS, and .NET 3.5 SP1, TFS 2008 is here. Please read the details about SP1 in Brian Harry's post: VS/VSTS/TFS/.NET 3.5 SP1 is shipping!
Here are the download links:
TFS July Power Tools Released!
The tools are available here: TFS July 2008 Power Tools. See Brian Harry’s blog for more details.
This July, TFS Power Tools introduce new features, one of which is the Alerts Editor. You can read all about the new features here: http://blogs.msdn.com/bharry/archive/2008/07/08/july-08-tfs-power-tool-preview.aspx

You can subscribe to get email alerts when certain events occur in a Team Project using Project Alerts. There's another way to subscribe to Team Project events and to configure the subscription too, it's bissubscribe.exe, which can be found on the Team Foundation Server. A GUI tool is also available to do that, it's called tfseventsubscription, and it can be deployed on client machines too:

You can use the /deleted switch with tf dir to list deleted items along with existent items. To undelete an item, you need to know its deletion ID, which will be a number preceded by X, for example: tf undelete $/proj/foo/bar.cs;X1234
To show deleted items in Source Control Explorer, you need to make sure you've selected this option:

Then you'll see the deleted items in Source Control Explorer, then you can just right click and choose undelete.
For more info on how to configure Visual Studio with Team Foundation Version Control, please read: http://msdn.microsoft.com/en-us/library/ms253064.aspx
Whenever you need to specify the version for an item, you can use /version or /v. By default, it takes a changeset id, so don't use the C prefix with it. You can use L, D, or W if you want to specify a label, date, or workspace version respectively. There's another way to do that, by appending the version spec to the item path, for example: $/foo/bar;C123, in this case, you have to use the C prefix.
To list files that are not checked out and not read-only, you can use tfpt online. The command is used to create pending edits on non-read-only files that don't have pending edits. The tool also classifies the items into sets: items with potential add and items with potential edit.
A nice harmless April's fool is to install BSOD screen saver, it looks so real and it can fake HDD activity! Just make sure your teammates won't restart your machine :)
We can specify the versionspec to tf label either by supplying the /v or /version argument (for example, /v:C1256), or by appending it to the itemspec (for example, foo.cs;C1256). Here's an example that attaches the "goodbuild" label to version 1256 of $/proj/foo.cs:
tf label goodbuild /v:1256 $/proj/foo.cs
What about labeling all items in a certain changeset? We need to get a list of these items first:
tf changeset 1256
But this will invoke the changeset dialog, so we have to use the /noprompt or /i to get the output in the command prompt window:
tf changeset 1256 /i
The output includes extra info like changeset number, owner, date, comment, and check-in notes. To extract the lines of the Items section, which contains the itemspecs, pipe the output to the find command:
tf changeset 1256 /i | find "$/"
This should work just fine as long as "$/" doesn't show up else where, in a comment for instance. Apply more filters if necessary! The output should look like the following:
add $/proj/foo.cs
edit $/proj/fold/bar.cs
...
We still got the Change column to get rid of, this can be accomplished using the parsing keywords of the for command that we will use for iteration:
for /f "usebackq tokens=2 delims=$" %i in (`tf changeset 1256 /i ^| find "$/"`) do tf label goodbuild /v:1256 $%i
We used the for command to iterate, the /f option specifies file parsing, and the "usebackq" parsing keyword indicates that the input file is the output of the command in the back quoted string, which in this case is:
`tf changeset 1256 /i ^| find "$/"`
We added the caret "^" to escape piping "|", otherwise, we will get the following error message:
| was unexpected at this time.
The parsing keywords do a great job to parse each line; "token=2 delims=$" passes the 2nd token from each line to the for body, with tokens delimited by $. That's why we had to prepend the $ to the itemspec in the for body as we lost it while parsing:
tf label goodbuild /v:1256 $%i
We may use any of the ways we saw before to specify the versionspec, such as:
tf label goodbuild $%i;C1256
So, the command would look like the following:
for /f "usebackq tokens=2 delims=$" %i in (`tf changeset 1256 /i ^| find "$/"`) do tf label goodbuild $%i;C1256
When you need to exclude a file in a project from source control, you can select that file in the Solution Explorer window, then go to File > Source Control > Exclude [filename] from Source Control. A red icon should appear to the left of that file in the Solution Explorer window to tell you that it's excluded from source control. This option doesn't show up in the context menu of the file, just as other options that only show up in File > Source Control. Another way to do that is to add the file to the project, then undo the "Add" pending change for that file. It will remain in your project but it won't be added to Source Control.

Class1.cs is excluded from Source Control while Class2.cs is added to project but not added to source control.
To know the answer to this question, you can run the following command:
tf history . /stopafter:1 /v:1~W /r
That's it :)
It happens so many times that a developer forgets to unlock files in his workspace before leaving the team for a vacation or for good. To solve this problem, there are several options: remove the lock (this won't work if exclusive checkout is enabled for the team project or the file type), delete the developer's workspace, or undo his changes.
- To unlock (requires UnlockOther permission): tf lock $/proj/test /lock:none /workspace workspaceName;DOMAIN\username /s:http://tfs:8080 /r
- To delete the workspace (requires AdminWorkspaces permission): tf workspace /delete workspaceName;DOMAIN\username /s:http://tfs:8080
- To undo changes (requires UndoOther permission): tf undo $/proj/test /workspace:workspaceName;DOMAIN\username /s:http://tfs:8080
Using tf.exe, you can get a specific version using its time and date:
tf get /version:"D:02/08/2008 1:00:00 AM"
The DateTime format that you use should be one of the formats supported by the .Net framework. So, D2008-02-08T01:00 works, while D2008-02-08T1:00 will return an error, TF10145: The version specification is not in a supported date or time format.
Don't worry, this post isn't about music or violins, it's about a web debugging proxy. Fiddler is an excellent tool to trace the HTTP/HTTPS traffic and debug it too. It's extensible, it's free, and it's awesome. Try it yourself: http://www.fiddler2.com/
Here's a screenshot that you can find it on the tool's website:

Impersonation lets you execute code using another user identity. In the WindowsIdentity class, there's a method called Impersonate, it allows you to impersonate the user specified by the WindowsIdentity instance. Just remember to call Undo to get back to the original identity. Here's an example from MSND:
private static void ImpersonateIdentity(IntPtr logonToken)
{
// Retrieve the Windows identity using the specified token.
WindowsIdentity windowsIdentity = new WindowsIdentity(logonToken);
// Create a WindowsImpersonationContext object by impersonating the
// Windows identity.
WindowsImpersonationContext impersonationContext = windowsIdentity.Impersonate();
Console.WriteLine("Name of the identity after impersonation: " + WindowsIdentity.GetCurrent().Name + ".");
Console.WriteLine(windowsIdentity.ImpersonationLevel);
// Stop impersonating the user.
impersonationContext.Undo();
// Check the identity name.
Console.Write("Name of the identity after performing an Undo on the");
Console.WriteLine(" impersonation: " + WindowsIdentity.GetCurrent().Name);
}
For more info, please read: WindowsIdentity.Impersonate Method