"witadmin destroyid" 命令不适用于多个 ID
"witadmin destroyid" command does not work with multiple ids
尽管文档表明可以在逗号分隔的列表中添加多个工作项 ID,但每当我尝试以下命令时,我都会收到错误消息:
witadmin destroywi /collection:<my collection url> /id:134,135
结果:
TF212000: 135 is not a valid argument for this command
如果我对单个 id(包括它具体抱怨的那个)执行相同的命令,一切正常。这是 widadmin destroywi 命令的文档:
Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]
/collection Specifies the Team Foundation project collection. Use a fully specified URL such as
http://servername:8080/tfs/Collection0.
/id Specifies the ID of the work item to destroy. Supports multiple IDs delimited by commas such as
12,15,23 (with no whitespace).
/noprompt Turns off the confirmation message.
是我做错了什么,还是 witadmin 有问题?
如果你在 134 和 135 之间留下一个 space,你就会得到那种错误。
您需要将传递给 /id
开关的值用双引号括起来,以使命令行将其视为一个参数而不是两个参数:
/id:"12,13,14"
否则它会作为 /id:12 13
传递 - 其中 13 是一个单独的参数(因此是错误)。
尽管文档表明可以在逗号分隔的列表中添加多个工作项 ID,但每当我尝试以下命令时,我都会收到错误消息:
witadmin destroywi /collection:<my collection url> /id:134,135
结果:
TF212000: 135 is not a valid argument for this command
如果我对单个 id(包括它具体抱怨的那个)执行相同的命令,一切正常。这是 widadmin destroywi 命令的文档:
Usage: witadmin destroywi /collection:collectionurl /id:id [/noprompt]
/collection Specifies the Team Foundation project collection. Use a fully specified URL such as
http://servername:8080/tfs/Collection0.
/id Specifies the ID of the work item to destroy. Supports multiple IDs delimited by commas such as
12,15,23 (with no whitespace).
/noprompt Turns off the confirmation message.
是我做错了什么,还是 witadmin 有问题?
如果你在 134 和 135 之间留下一个 space,你就会得到那种错误。
您需要将传递给 /id
开关的值用双引号括起来,以使命令行将其视为一个参数而不是两个参数:
/id:"12,13,14"
否则它会作为 /id:12 13
传递 - 其中 13 是一个单独的参数(因此是错误)。