Here is the simple function I added to my powershell profile:
To find the AreaId and IterationId for your project/versions, just look at a bug you know is setup correctly:
PS C:\> tfpt query /collection:http://3bs001vsteam:8080/tfs /wiql:"select AreaId,IterationId from workitems where ID = 879"
Next I hooked this into my existing "todo" function by adding a new case in its $target switch statement for “tfs”, which calls my create-tfstask function and returns. Updated todo function: