Versions

WiqAdmin is provided in 3 versions, one compatible with TeamExplorer 2008, one with TeamExplorer 2010 and one with Team Explorer 2012. For each version the command line parameters may differ.

Commands

The following command are accepted by wiqadmin:

  • list
  • import
  • export
  • rename
  • delete
  • copy
  • help

List

Lists work item queries.

TeamExplorer 2008 Usage: wiqadmin list /s:server /p:project [/private] [/public]

switch required description
/s yes Specifies the name of the Team Foundation Server.
/p yes Specifies the name of the team project.
/private   Returns only private queries.
/public   Returns only public queries.



TeamExplorer 2010 and 2012 Usage: wiqadmin list /collection:collectionurl /p:project [/folder:folderpath] [/recursive] [/nopath] [/fullpath]

switch required description
/collection yes Specifies the Team Foundation project collection.
/p yes Specifies the name of the team project.
/folder   Specifies the folder path to list the work item queries.
/recursive   Turns on recursive listing.
/nopath   Turns off path display.
/fullpath   Turns on full path display.

 

Import

Imports the XML definition of a work item query.
The import command supports variable replacement in queries before importing. The supported variables are describe in the following table:

variable replace value
$$PROJECTNAME$$ | Replaced with the project name specified using the /p switch.



TeamExplorer 2008 Usage: wiqadmin import /s:server /p:project /n:queryname /f:filename [/private]

switch required description
/s yes Specifies the name of the Team Foundation Server.
/p yes Specifies the name of the team project.
/n yes Specifies the name of the work item query to import.
/f yes Specifies the work item query file to import.
/private   Imports as a private query.



TeamExplorer 2010 and 2012 Usage: wiqadmin import /collection:collectionurl /p:project /n:querypath /f:filename

switch required description
/collection yes Specifies the Team Foundation project collection.
/p yes Specifies the name of the team project.
/n yes Specifies the path and name of the work item query to import.
/f yes Specifies the work item query file to import.

 

Export

Exports the XML definition of a work item query.

TeamExplorer 2008 Usage: wiqadmin export /s:server /p:project /n:queryname [/f:filename] [/e:encoding]

switch required description
/s yes Specifies the name of the Team Foundation Server.
/p yes Specifies the name of the team project.
/n yes Specifies the name of the work item query to export.
/f   Specifies the destination file for exporting the work item query XML. If not specified, the XML is output to the display.
/e   Specifies the name of the .NET Framework 2.0 encoding used to import the XML file. For example, /e:utf-7 will use Unicode (UTF-7) encoding. Encoding is automatically detected whenever possible. If the encoding cannot be detected, UTF-8 is used.



TeamExplorer 2010 and 2012 Usage: wiqadmin export /collection:collectionurl /p:project /n:querypath [/f:filename] [/e:encoding] [/d:path] [/nopath]

switch required description
/collection yes Specifies the Team Foundation project collection.
/p yes Specifies the name of the team project.
/n yes Specifies the full path of the work item query to export. Use @<filename> to specify a file containing one query per line to export.
/f   Specifies the destination file for exporting the work item query XML. If not specified, the XML is output to the display.
/e   Specifies the name of the .NET Framework 2.0 encoding used to import the XML file. For example, /e:utf-7 will use Unicode (UTF-7) encoding. Encoding is automatically detected whenever possible. If the encoding cannot be detected, UTF-8 is used.
/d   Specifies the destination directory for exporting the work item query XML. A file is created with the query name.
/nopath   When used with the /d parameter, specifies that the query path should not be exported.

 

Rename

Renames (and/or moves with TFS 2010) a work item query.

TeamExplorer 2008 Usage: wiqadmin rename /s:server /p:project /n:queryname /new:newname [/noprompt]

switch required description
/s yes Specifies the name of the Team Foundation Server.
/p yes Specifies the name of the team project.
/n yes Specifies the name of the work item query to rename.
/new yes Specifies the new name of the work item query.
/noprompt   Turns off the confirmation message.



TeamExplorer 2010 and 2012 Usage: wiqadmin rename /collection:collectionurl /p:project /n:querypath /new:newpath [/noprompt]

switch required description
/collection yes Specifies the Team Foundation project collection.
/p yes Specifies the name of the team project.
/n yes Specifies the path and name of the work item query to rename/move.
/new yes Specifies the new path and name of the work item query.
/noprompt   Turns off the confirmation message.

 

Delete

Deletes a work item query.

TeamExplorer 2008 Usage: wiqadmin delete /s:server /p:project /n:queryname [/noprompt]

switch required description
/s yes Specifies the name of the Team Foundation Server.
/p yes Specifies the name of the team project.
/n yes Specifies the path of the work item query to delete. Use @<filename> to specify a file containing one query per line to delete.
/noprompt   Turns off the confirmation message.



TeamExplorer 2010 and 2012 Usage: wiqadmin delete /collection:collectionurl /p:project /n:querypath [/noprompt]

switch required description
/collection yes Specifies the Team Foundation project collection.
/p yes Specifies the name of the team project.
/n yes Specifies the path of the work item query to delete. Use @<filename> to specify a file containing one query per line to delete.
/noprompt   Turns off the confirmation message.

 

Copy

Copies work item queries from a source project to a target project. Projects can be in different collections. Supports TFS 2010 only.

TeamExplorer 2010 and 2012 Usage:  wiqadmin copy  /collectionFrom:Sourcecollectionurl  /projectFrom:Sourceproject   /collectionTo:Targetcollectionurl  /projectTo:Targetproject /onDup:[O|RN|RO|S]  {[/folder:folderpath|/n:query path] [/recursive] [/nopath] [/noprompt] [/isSilent]}

switch required description
/collectionFrom yes Specifies the source Team Foundation project collection.
/collectionTo yes Specifies the target Team Foundation project collection.
/projectFrom yes Specifies the name of the source team project.
/projectTo yes Specifies the name of the target team project.
/onDup  yes

Specifies what to do when a duplicate query exists in the target project.   Options are

  • O: overwrite the query with the source query
  • RN: Rename the new query and keep original query intact.
  • RO: Rename the original query and copy the new query.
  • S: Skip the copy of this query.
/folder   Specifies the source/target folder path from/to which to copy queries. Mutually exclusive with the /n switch.
/n   Specifies the source/target path and name of a query from/to which to copy. Mutually exclusive with the /folder switch. Cannot be used with the /recursive switch.
/recursive   Turns on recursive copy.
/nopath   Turns off path display.
/silent   Turns off display of progress.
/noPrompt   Turns off credential request when connecting to TFS.



Last edited May 27, 2013 at 1:21 PM by GuillaumeRouchon, version 16

Comments

No comments yet.