Using Tfpt Command Line Tool

03/09/2008

Using Tfpt Command Line Tool

I’m doing a lot demonstrations for clients and for each client I create a new Team Project.
Create new Team Project in Team System is very slow and long.

Today I said Enough!

I’ll Create Team Project from now on from Command Line!

Beside creating New Team Project there is a lot of useful commands like:

Update workitem values from a file, Delete GlobalList, Destroy WIT and more….

Team Foundation Server 2008 Power Tool (tfpt.exe) is a command-line tool.

To use these commands, start tfpt.exe at the Command Prompt. Some of the commands will display a graphical user interface when used. Team Foundation Server Power Tool includes the following commands:

CreateTeamProject Command
Use the createteamproject command to create a team project on a TFS server. **Note: this command requires Team Foundation Server 2008 Team Explorer SP1 to be installed.

Example : tfpt /server:ServerName /teamproject:ProjectName /sitetitle:ProjectSiteTitle /sourcecontrol:New|None|BranchPath /processtemplate:templatesname

Scorch Command
Use the scorch command to ensure that source control and local disk are identical. Your local disk will be scanned for items which are not in source control. These items will be deleted from disk, just as in tfpt treeclean. Additionally, items determined to be different on disk from those in source control will be redownloaded from the server. Items with pending changes are exempted.

Workspace Command
Use the workspace command to update the computer name for a specific workspace.

Example: tfpt workspace /updatecomputername workspace

Unshelve Command
Use the unshelve command to unshelve and merge the changes in the workspace.

Example: tfpt unshelve [shelvesetname[;username]] [/nobackup] [/noprompt [/prefer:(local|shelved)] [/automerge:(all|none)] [/move] [/recursive] [itemspec...]]

Rollback Command
Use the rollback command to roll back changes that have already been committed to Team Foundation Server.

Example: tfpt rollback [/changeset:changesetnum] [/recursive]  [/noprompt [/automerge:(all|none)]] [filespec...]

Online Command
Use the online command to create pending edits on writable files that do not have pending edits.

Example: tfpt [/deletes] [/adds] [/diff] [/noprompt [/preview] [/purge]] [/exclude:filespec1,filespec2,...] [filespec...] [/recursive]

GetCS Command
Use the GetCS (Get Changeset) command to get the changes in a particular changeset.

Example: tfpt getcs /changeset:changesetnum

UU Command
Use the UU (Undo Unchanged) command to undo unchanged files, including adds, edits, and deletes.

Example: tfpt uu [/changeset:changesetnum] [/recursive] [/noget] [filespec...]

Annotate Command
Use the annotate command to download all versions of the specified files and show information about when and who changed each line in the file.

Example: tfpt annotate [/noprompt] filespec[;versionspec]

Review Command
Use the review command to optimize the code review process to avoid checking in or shelving.

Example: tfpt review [[filespec...] [/recursive] | /shelveset:shelvesetname[;username]]

History Command
Use the history command to display the revision history for one or more files and folders. The /followbranches option returns the history of the file branch’s ancestors.

Example: tfpt history [/version:versionspec] [/stopafter:number] [/recursive] [/user:username] [/followbranches] [/format:(brief|detailed)] [/slotmode] filespec

Workitem Command
Use the workitem command to create, update, or view work items.

Examples:

Creating a new Bug work item with a title of ‘New’ and assigned to Jason
tfpt workitem /new project1\Bug /fields:”Title=New;Assigned To=Jason”

Updating work item 123 with field values from a file
tfpt workitem /update 123 /fields:@myFieldValues.txt

Updating all work items assigned to me to be assigned to Jason (uses Query)
tfpt query /format:id “project1\public\My Work Items” | tfpt workitem
     /update @ /fields:”Assigned To=Jason”

fields:
   fieldN           The name of a field to update.
   valueN           The value to set on the fieldN.
   filename         The file that has the field/value pairs to use.

Query Command
Use the query command to run a work item query and display the results. If you do not provide a specific query, all the active work items assigned to you are displayed.

Example: tfpt query [/format:[tsv|xml|id]] [/include:header,data,count] [storedquery | /wiqfile:filename | /wiql:wiql]

Treeclean Command
Use the treeclean command to view and optionally delete files that are not under source control in the current directory and all subdirectories. This command is useful when you want to remove temporary files from your local workspace, such as files created by the compiler.

Example: tfpt treeclean -delete

DestroyWI Command
Use the destroywi command to destroy one or more work items. Currently, work items can only be deleted. Destroying a work item means the work item is physically deleted and cannot be restored.

Example: tfpt destroywi /server:tfsservername /workitemid:value1[,value2,...] [/noprompt]

DestroyWITD Command
Use the destroywitd command to destroy a work item type. Currently, work item types can only be deleted. Destroying a work item type means that work items of that type are physically deleted and cannot be restored.

Example: tfpt destroywitd /server:tfsservername /project:projname /workitemtype:witdname [/noprompt]

TweakUI Command
Use the tweakUI command to modify Team Explorer client connection values. This command enables you set various connection settings. In addition, this command enables you to define the client certificate needed to connect to a Team Foundation Server that has been configured to require client-side certificates.

Add comment
facebook linkedin twitter email

Leave a Reply

7 comments

  1. Pakaffok21/09/2008 ב 20:31

    favorited this one, dude

  2. bigembabbype28/09/2008 ב 06:05

    favorited this one, brother

  3. nick_bocolo30/06/2009 ב 12:00

    http://roletoc.com/zeltanoba.html cdarorcoel
    cdarorcoel
    [link=http://zelcnaerrel.com/getboc.html]cdarorcoel[/link]
    [url=http://letocnobog.com/sitaclet.html]cdarorcoel[/url]
    http://getsitmonzelerg.com/gettadel.htm relcochicl varcobo
    nogetc
    http://pascdombocc4tta.com/elterrelacre.htm nolazelcot zelzelsi
    coercolet
    http://mondarnoolotroc.com/elviel.htm vimoncacro erletor
    clielteltze
    http://monletotaellige.com/caletosit.htm boceltchicra eroueltric
    rolconolib
    http://coalc4tdronnoca.com/bocdardartro.htm varerz pasrolsitr
    boorac
    http://tagetc4tracbase.com/acelsitl.htm roltrocde dronvitrr
    bocdommo
    http://racdareltdronac.com/litrdarr.htm c4tmon ervitr
    eltnobaslicn
    http://delalcopaselzel.com/nolabas.htm darchicgetac erergetta
    getbasbas
    http://c4tc4torcamonbo.com/c4trolsita.htm eltrol ouletol
    delelcadron
    http://ordrondeldelmon.com/trocva.htm pasnocoace trreldartr
    ouvipas
    http://libaseltalletoe.com/elreldomdel.htm c4torcobasd cadarvisi
    cnatavarl
    http://delalerelterdom.com/eltmoncoc4tv.htm roorrol dronze
    c4tc4tdomdom
    http://licoletoouricde.com/racnocr.htm delchigetzel boletoletoc
    oroutro
    http://zelchiacdarorli.com/nopasaccodo.htm raccaboccdar olocna
    eltace
    http://riccovaracrolca.com/delcocadarac.htm rolleto lataracpaso
    domouchirac
    http://cnaletoliricace.com/monlilarore.htm relace lalizelelte
    cnachili
    http://cnac4tolodronba.com/zelboctan.htm vichicco robasre
    sitcna
    http://rolcnareldomliv.com/delnonoou.htm lichit tacovirel
    darrocnac4t
    http://orbocpassitleto.com/letoreloul.htm relgetch libositmonc
    pasdelva
    http://roldrondronactr.com/licnacnacabo.htm getbocp pascoraccad
    outacaorch
    http://basacelouboccna.com/cacron.htm erlaeltcnacl acracolopa
    noalrelre
    http://boctazellieltze.com/coelrolletoe.htm pastae catroc
    sitallasitre
    http://erlidelcachidro.com/trcleto.htm catrocvichir aceleltdell
    labasvisitvi
    http://accotroctrgetva.com/olositzelelt.htm ricacolovar letoletol
    nogetorracd
    http://nocamonrelmonva.com/delcosit.htm elcnado drongetacelc
    noertavic
    http://licasittrdaralt.com/vidarvigetc.htm erzelvard basracle
    relliboc
    http://liriclimonoloro.com/chilar.htm ricrol codelboo
    codomracva
    http://ellitac4tdelrel.com/acelviercamo.htm darsitr trocvarace
    ricrelroc
    http://eltdellaorvartr.com/olocnal.htm domcou pasrolgetol
    colidel
    http://alalvinodelcnaa.com/ornoacelel.htm domlierr ordelric
    aczelrolri
    http://livialbasorreld.com/getliricbas.htm c4tchigete letoda
    pasoutrocvar
    http://trocbastachibor.com/roltrnorelsi.htm ctrocd rolsit
    letoellacae
    http://oraldomnobotada.com/tacorno.htm zelchi relacelac
    pastabasdel
    http://delvicgetvarcap.com/boctroca.htm oulic4trol ricgetgetva
    troccor
    http://licarozelpasc4t.com/caolocn.htm eldomtrbas baslaclet
    sitchia
    http://relcopasalvilet.com/letoc4.htm domzel getrotrocda
    dronvard
    http://passitorchicnat.com/allicp.htm roelolochis ordrono
    orleto
    http://bocletobocvarpa.com/orcouc4.htm bocvirell zelrelgetv
    relorv
    http://notrocvidomccad.com/varsitelchit.htm elacelrolo acel
    rogetboboc

  4. nick_ligetl30/06/2009 ב 12:04

    http://lieltletog.com/ourolmonrol.html notrdelelt
    notrdelelt
    [link=http://alletova.com/aclale.html]notrdelelt[/link]
    [url=http://bascarelrol.com/vicracz.html]notrdelelt[/url]
    http://tanobonobasricl.com/dronletoo.htm virolsitb rotrocr
    getbasca
    http://getouricrellano.com/ccocoorreldo.htm erpasactr trocpaso
    viliractr
    http://trdomli
    ricdronnom

  5. Agenzia viaggi Giordania13/02/2010 ב 09:25

    lei ha fornito qui con une buone informazioni..

  6. Nick19/01/2011 ב 17:41

    Why does scorch only take a local itemspec? It knows what workspace you’re using because you’re calling it from a folder that’s mapped to a workspace, it’s just a simple string.replace to change a server item path to a local disk item path. I wish there was some consistency between TFPT commands.