TFSLabConfig TPCLibraryShare 命令

说明说明

这些命令仅在 SCVMM 2012 服务器上工作,在 SCVMM 2008 R2 服务器上不支持。

使用 TPCLibraryShare 命令从团队项目集合中添加或移除库共享,或者修改库共享的 Lab Management 设置。

若要运行这些命令,您必须是指定集合的 Team Foundation Server 中的团队项目集合管理员组的成员。此外,您必须是管理员或将委托的管理员角色成员在添加主机组的SCVMM服务器。此外,您必须确保在任何 Team Foundation Server 的其他团队项目集合中没有使用同一 SCVMM 库共享。

TfsLabConfig TPCLibraryShare
      /collection:collectionUrl
      [/add 
            /scvmmLibraryShare:vmmLibrarySharePath
            /name:libraryShareName
            [/autoprovision:{True|False}]]
      [/delete 
            /name:libraryShareName
            [/noprompt]]
      [/edit 
            /name:libraryShareName
            [/autoprovision:{True|False}]
            [/noprompt]]
      [/list]
      [/listscvmmlibraryshares]

参数

选项

说明

collection:collectionUrl

必需。指定团队项目集合所在的应用层 Team Foundation Server 的 URL。

add

将指定的库共享添加到团队项目集合。必须同时指定 /collection/scvmmlibraryshare, 和 /name 选项以及 /add.

scvmmLibraryShare:vmmLibrarySharePath

/add 是必需的。指定 VMM 份额的完全限定的域名称 (FQDN)。通过使用 VMM Admin Console 可检索 FDQN 路径。

name:libraryShareName

/addeditdelete 是必需的。指定团队项目集合中的库共享的名称。

autoProvision:True|False

/add/edit 是可选的。指定是否将库共享自动分配给集合中的每个团队项目。默认情况下,/autoProvision 被设定为True,库共享自动分配给集合中的每个团队项目。/autoProvision选项仅会影响现有的团队项目。

Delete

从团队项目集合中移除指定的库共享。必须指定 /collection/name 选项。

noPrompt

/add/edit/delete是可选的。从命令窗口禁止显示进度和结果数据。

edit

更改库共享的 Lab Management 设置。必须指定 /collection/name 选项。

list

列出指定到指定团队项目集合的所有库共享。

listscvmmlibraryshares

列出 VMM 中可用的所有库共享。

示例

在这个示例,一个库共享被添加到团队项目集合。

TFSLabConfig TPCLibraryShare
      /collection:http://abc:8080/TFS/Collection0
      /add
      /scvmmLibraryShare:"LibraryShares\LibraryShare1"
      /name:LibraryShare1

请参见

参考

TFSLabConfig TPCHostGroup 命令

概念

使用 TFSLabConfig 配置 Lab Management

配置和管理 Lab Management