I have been experimenting with controlling tfs with powershell.
Mostly this consists of creating wrappers for the command-line tools.
Here is the github repo: https://github.com/chriseyre2000/Powershell/tree/master/Posh-Tfs
It can perform checkin and checkouts.
More usefully it can inform you that you have files in your tfs mapped folders that are not checked in or excluded – Get-tfsStatus(). This can greatly help in avoiding broken builds. Visual Studio’s tfs integration while better than it has been can still be a little problematic.
The posh-tfpt library is a wrapper around the tfs power tools.
The tf command line is great for checkins, changeset and version queries.
The tfpt adds the ability to query work items. I have not been able to reliably update work items.
Not sure if I am doing something wrong or if the cloud version of tfs that I am using is somewhat limited.
These will provide useful examples:
get-help select-tfsworkitemquery -Examples
These queries have been based upon: