Get-TfsWorkItem
Gets the contents of one or more work items.
Table of Contents
Syntax
Query by revision
Get-TfsWorkItem
[-WorkItem] <object>
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-Revision <int>]
[-Server <object>]
[-ShowWindow]
[-Team <object>]
[-TimePrecision]
Query by date
Get-TfsWorkItem
[-WorkItem] <object>
-AsOf <DateTime>
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-Server <object>]
[-Team <object>]
[-TimePrecision]
Get deleted
Get-TfsWorkItem
[-WorkItem <object>]
-Deleted
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-Server <object>]
[-Team <object>]
[-TimePrecision]
Simple query
Get-TfsWorkItem
[-AreaPath <string>]
[-AsOf <DateTime>]
[-BoardColumn <string[]>]
[-BoardColumnDone <bool>]
[-ChangedBy <object>]
[-ChangedDate <DateTime[]>]
[-Collection <object>]
[-CreatedBy <object[]>]
[-CreatedDate <DateTime[]>]
[-Description <string[]>]
[-Ever]
[-Fields <string[]>]
[-IncludeLinks]
[-IterationPath <string>]
[-Priority <int[]>]
[-Project <object>]
[-Reason <string[]>]
[-Server <object>]
[-State <string[]>]
[-StateChangeDate <DateTime[]>]
[-Tags <string[]>]
[-Team <object>]
[-TimePrecision]
[-Title <string[]>]
[-ValueArea <string[]>]
[-WorkItemType <string[]>]
Query by WIQL
Get-TfsWorkItem
-Wiql <string>
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-Server <object>]
[-Team <object>]
[-TimePrecision]
Query by saved query
Get-TfsWorkItem
-SavedQuery <string>
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-QueryParameters <Hashtable>]
[-Server <object>]
[-Team <object>]
[-TimePrecision]
Query by filter
Get-TfsWorkItem
-Where <string>
[-Collection <object>]
[-Fields <string[]>]
[-IncludeLinks]
[-Project <object>]
[-Server <object>]
[-Team <object>]
[-TimePrecision]
Parameters
Specifies the area path to look up for in a work item. Wildcards are supported.
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Returns the field values as they were defined in the work item revision that was the latest revision by the date specified.
Type | DateTime |
Position | (Named) |
Default Value | 1/1/0001 12:00:00 AM |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the board column to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies whether the work item is in the sub-column Doing or Done in a board.
Type | bool |
Position | (Named) |
Default Value | False |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the name or email of the user that did the latest change to the work item.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the date of the latest change to the work item.
Type | DateTime[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
-Collection (Aliases: Organization)
Specifies the URL to the Team Project Collection or Azure DevOps Organization to connect to, a TfsTeamProjectCollection object (Windows PowerShell only), or a VssConnection object. You can also connect to an Azure DevOps Services organizations by simply providing its name instead of the full URL. For more details, see the Get-TfsTeamProjectCollection cmdlet. When omitted, it defaults to the connection set by Connect-TfsTeamProjectCollection (if any).
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the name or email of the user that created the work item.
Type | object[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the date when the work item was created.
Type | DateTime[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Gets deleted work items.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the description to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Switches the query to historical query mode, by changing operators to “WAS EVER” where possible.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies which fields should be retrieved. When omitted, defaults to a set of standard fields that include Id, Title, Description, some state-related fields and more. To retrive all fields, pass an asterisk (‘*’) to this argument.
Type | string[] |
Position | (Named) |
Default Value | System.AreaPath, System.TeamProject, System.IterationPath, System.WorkItemType, System.State, System.Reason, System.CreatedDate, System.CreatedBy, System.ChangedDate, System.ChangedBy, System.CommentCount, System.Title, System.BoardColumn, System.BoardColumnDone, Microsoft.VSTS.Common.StateChangeDate, Microsoft.VSTS.Common.Priority, Microsoft.VSTS.Common.ValueArea, System.Description, System.Tags |
Accept pipeline input | False |
Accept wildcard characters | False |
Gets information about all links and attachments in the work item. When omitted, only fields are retrieved.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the iteration path to look up for in a work item. Wildcards are supported.
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the priority of the work item.
Type | int[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the name of the Team Project, its ID (a GUID), or a Microsoft.TeamFoundation.Core.WebApi.TeamProject object to connect to. When omitted, it defaults to the connection set by Connect-TfsTeamProject (if any). For more details, see the Get-TfsTeamProject cmdlet.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the path of a saved query to be executed.
Type | Hashtable |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the reason (field ‘System.Reason’) to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
B Specifies a work item revision number to retrieve. When omitted, returns the latest revision of the work item.
Type | int |
Position | (Named) |
Default Value | 0 |
Accept pipeline input | False |
Accept wildcard characters | False |
-SavedQuery (Aliases: QueryPath)
Specifies the path of a saved query to be executed.
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the URL to the Team Foundation Server to connect to, a TfsConfigurationServer object (Windows PowerShell only), or a VssConnection object. When omitted, it defaults to the connection set by Connect-TfsConfiguration (if any). For more details, see the Get-TfsConfigurationServer cmdlet.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Opens the specified work item in the default web browser.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the state (field ‘System.State’) to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the date of the most recent change to the state of the work item.
Type | DateTime[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the tags to look up for in a work item. When multiple tags are supplied, they are combined with an OR operator - in other works, returns work items that contain ANY ofthe supplied tags.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the name of the Team, its ID (a GUID), or a Microsoft.TeamFoundation.Core.WebApi.WebApiTeam object to connect to. When omitted, it defaults to the connection set by Connect-TfsTeam (if any). For more details, see the Get-TfsTeam cmdlet.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Fetches work items in “time-precision mode”: search criteria in WIQL queries take into account time information as well, not only dates.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the title to look up for in a work item. Wildcards are supported. When a wildcard is used, matches a portion of the title (uses the operator “contains” in the WIQL query). Otherwise, matches the whole field with the operator “=”, unless -Ever is also specified. In that case, uses the operator “was ever”.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies the Value Area (field ‘Microsoft.VSTS.Common.ValueArea’) to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies a filter clause (the portion of a WIQL query after the WHERE keyword).
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
-Wiql (Aliases: Query, QueryText)
Specifies a query written in WIQL (Work Item Query Language)
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies a work item. Valid values are the work item ID or an instance of Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem.
Type | object |
Position | 0 |
Default Value | (N/A) |
Accept pipeline input | True (byvalue) |
Accept wildcard characters | False |
Specifies the work item type to look up for in a work item. Wildcards are supported.
Type | string[] |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Inputs
System.Object
Specifies a work item. Valid values are the work item ID or an instance of Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models.WorkItem.