Skip to content

Instantly share code, notes, and snippets.

@v2keener
Last active August 29, 2015 13:57
Show Gist options
  • Save v2keener/9347092 to your computer and use it in GitHub Desktop.
Save v2keener/9347092 to your computer and use it in GitHub Desktop.
Viewing Open Work Items, TFS via PowerShell
<#
Taken from Julian Kay's Blog:
http://juliankay.com/development/querying-tfs-with-tfpt-exe-and-powershell/
#>
$TFSSERVER = "hq-tfs08-01.branded3.net"
Function Get-WorkItem
{
$query = "SELECT [System.Id], [System.Title] FROM WorkItems " +
"WHERE [System.AssignedTo] = 'Julian Kay' " +
"AND [System.State] <> 'Closed' " +
"AND [System.State] <> 'Resolved' " +
"ORDER BY [System.Id]"
tfpt query /collection:$TFSSERVER /wiql:$query /include:data
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment