invoke-wiq.ps1 – "run" a .wiq file and get the results back


This request came in from an internal PS list.  You can certainly make it fancier, and all it does now is invoke a WIT method, but hopefully you may find it of value.

 

param($wiqfilename = $(throw 'must specify wiq filename'))

# get the fullpath to the psqfile, get the provider path as
# it will handle UNC paths too
$wiqfilename = (Resolve-Path $wiqfilename).ProviderPath
$wiq =  (gc $wiqfilename)

$tfs = get-tfs $wiq.WorkItemQuery.TeamFoundationServer
$results = $tfs.wit.Query($wiq.WorkItemQuery.Wiql, @{'project' = $wiq.WorkItemQuery.TeamProject})
$results

Comments (3)
  1. .NETicated says:

    MVP Summit MVP Summit 2008, Seattle Day +1 on Grant Holliday's blog MVP Summit 2008, Seattle Day

  2. V-Ness on Web Access – Send an email with a work item or query results Willy-Peter Schaub on MVP Global…

Comments are closed.

Skip to main content