Welcome to MSDN Blogs Sign in | Join | Help

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 = [xml] (gc $wiqfilename)

$tfs = get-tfs $wiq.WorkItemQuery.TeamFoundationServer
$results = $tfs.wit.Query($wiq.WorkItemQuery.Wiql, @{'project' = $wiq.WorkItemQuery.TeamProject})
$results
Published Thursday, April 17, 2008 11:51 AM by jmanning

Comments

# Microsoft news and tips » invoke-wiq.ps1 - “run” a .wiq file and get the results back

# Team System Link Love - 8

Monday, April 21, 2008 2:23 AM by .NETicated

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

# VSTS Links - 04/22/2008

Tuesday, April 22, 2008 12:20 PM by Team System News

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

Anonymous comments are disabled
 
Page view tracker