This project is read-only.



The Add-WI cmdlet enables to create a Workitem for a given type and project name.

Obtain the TFS server using the Get-TFS CmdLet.


Name Description Example
-tfs TFS server obtained using Get-TFS $tfs = Get-TFS -rul http://address:8080
-ProjectName Project name
-Type Workitem type Bug
-Title Workitem title
-Param Additional parameters

To give parameters, you only need to add association "Fields|Value", like for example:
-Param "Description|My Comment" "Category|Development"

Example where creating a BUG

PSTFS > $tfs = Get-TFS colmar

PSTFS > $w = Add-WorkItem -tfs $tfs -ProjectName VSTS.Noham -Type Bug -Title "My Bug 13/02/2009" -Param "Description|My

PSTFS > $w | ft

         Id Uri            Revision Revisions   Attachments Links       Store       Title       State       Reason
         -- ---            -------- ---------   ----------- -----       -----       -----       -----       ------
        350 vstfs://...           1 {Microso... {}          {}          Microsof... My Bug 1... Active      New

PSTFS > $w.Title
My Bug 13/02/2009

PSTFS > $w.Title = $w.Title + " Add"

PSTFS > $w.Title
My Bug 13/02/2009 Add

PSTFS > $w.Save()

Last edited Nov 7, 2009 at 2:57 PM by pc152, version 2


No comments yet.