Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Powershell and TFS: tf.exe versus Power tools TFS cmdlets?

I'm in the middle of creating a script to do large amount of moves in my TFS instance. I have the tfs cmdlets available with the 2010 TFS Power Tools, but the get-help documentation for them is very sparse. Specifically, Add-TfsPendingChange doesn't seem to support rename, which forces me to use "tf.exe rename" instead.

First off: have I somehow missed the documentation for the cmdlets? I've tried get-help on the commands, but they don't support -detailed or -examples flags. Is anything more available?

Secondly: what reason do I have to prefer any of the cmdlets over regular tf.exe? Are there benefits other than passing objects through the pipe when performing similar functions?

like image 376
bwerks Avatar asked Feb 04 '11 20:02

bwerks


2 Answers

The TF cmdlets are a bit of a minimalistic offering at this point and that includes the provided documentation. In general I would use the TF cmdlets where they support what I'm trying to do - especially if you have any queries. Processing the output of the query cmdlets is much easier because they give you rich objects instead of the text stream you have to parse when using something like tf status . /r.

Also keep in mind that on a x64 Windows system, the TF cmdlets only work in a 32-bit PowerShell host.

like image 144
Keith Hill Avatar answered Sep 18 '22 13:09

Keith Hill


The tf cmdlets are not exactly useless, but ... we decided against trying to use them in our build environment right now, even though it means text-parsing.

Aside from the x64 thing, there are lots of missing commands (thanks @Keith) and missing parameters, and most importantly, they don't work in remote sessions!

like image 21
Jaykul Avatar answered Sep 18 '22 13:09

Jaykul