Configure Lab Management with TFSLabConfig

Last Update: 3/6/2017

TFS 2017 | TFS 2015 | TFS 2013 | TFS 2012 | TFS 2010

Team Foundation Server includes a command-line tool to help you configure and manage the lab service provide by Visual Studio Lab Management.

The TFSLabConfig command-line tool is located in Drive:\Program Files\Microsoft Team Foundation Server \Tools on Team Foundation Server application tier -- by default, this will be:

  • TFS 2015: %programfiles%\Microsoft Team Foundation Server 14.0\Tools
  • TFS 2013: %programfiles%\Microsoft Team Foundation Server 12.0\Tools
  • TFS 2012: %programfiles%\Microsoft Team Foundation Server 11.0\Tools
  • TFS 2010: %programfiles%\Microsoft Team Foundation Server 2010\Tools

It is also located in Drive:\Program Files\Microsoft Visual Studio <version>\Common7\IDE on the client machine where Microsoft Test Manager is installed.

Required Permissions:

To use TFSLabConfig, you must have the appropriate permissions for the operation that you want to perform. The required permissions are described for each command in the command reference topic.

CreateTeamProjectHostGroup

Use the CreateTeamProjectHostGroup command to assign a host group from a team project collection to an individual team project in the collection. Host groups specify one or more physical machines that are the deployment targets for virtual environments in Visual Studio Lab Management. Host groups are created in System Center Virtual Machine Manager (SCVMM) and assigned to a project collection by Visual Studio Lab Management. Use separate CreateTeamProjectHostGroup commands to assign multiple host groups to a team project.

Note: You can automatically assign a host group to all the projects in a team project collection when you assign the host group to the team project collection. See TFSConfig Lab /HostGroup Commands and How to: Change the Host Groups for Your Team Project Collections.

Required Permissions

To use the CreateTeamProjectHostGroup command, you must have the Manage Lab Locations permission at the Team Project Collection Host Group level. By default, the members of the Team Foundation Server Administrators and Project Collection Administrators groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig CreateTeamProjectHostGroup
      /Collection:collectionUrl
      /TeamProject:{* |teamProjectName}
      /TeamProjectCollectionHostGroup:(* |teamProjectCollectionHostGroupName}
      /Name:teamProjectHostGroupName
      [/Description:teamProjectHostGroupDescription]
      [/NoPrompt]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject:{ * | teamProjectName} Required. The name of the team project. Use quotation marks if there are spaces in the name. Use an asterisk (* ) to assign the specified host group to all team projects in the collection.
TeamProjectCollectionHostGroup:{ * | teamProjectCollectionHostGroupName}
Name: teamProjectHostGroupName Required. The name to assign to the host group in the team project.
Description: teamProjectHostGroupDescription Optional. A description of the team project host group.
NoPrompt Optional. Do not prompt the user for confirmation.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

In the first example, all the host groups in the team project collection are assigned to each team project in the collection. In the second example, one host group in the team project collection is assigned to a specific team project.

REM First example
TFSLabConfig CreateTeamProjectHostGroup
       /collection:http://abc:8080/TFS/Collection0
       /teamProject:*
       /teamProjectCollectionHostGroup:*
REM Second example
TFSLabConfig CreateTeamProjectHostGroup
       /collection:http://abc:8080/TFS/Collection0
       /teamProject:Project1
       /teamProjectCollectionHostGroup:tpchg1
       /name:hg1

CreateTeamProjectLibraryShare

Use the CreateTeamProjectLibraryShare command to assign a library share from a team project collection to an individual team project in the collection. A library share provides access to file-based resources for virtual environments such as ISO images and virtual hard disks. Library shares are created in System Center Virtual Machine Manager (SCVMM) and assigned to project collection by Visual Studio Lab Management. Use separate CreateTeamProjectLibraryShare commands to assign multiple library shares to a team project.

Note: You can automatically assign a library share to all projects in a team project collection by using the TFSConfig Lab /LibraryShare Commands and How to: Change the Library Share for Your Team Project Collections.

Required Permissions:

To use the CreateTeamProjectLibraryShare command, you must have Manage Lab Locations permission at the Team Project Collection Library Share level. By default, members of the Team Foundation Server Administrators and Project Collection Administrators groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig CreateTeamProjectLibraryShare 
Collection:collectionUrl
      /TeamProject:{* |teamProjectName}
      /TeamProjectCollectionLibraryShare:{* |teamProjectCollectionLibraryShareName} 
      /Name:teamProjectLibraryShareName
       [/Description:teamProjectLibraryShareDescription]
       [/NoPrompt]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject:{ * | teamProjectName} Required. The name of the team project. Use quotation marks if there are spaces in the name. Use an asterisk (* ) to assign the specified host group to all team projects in the collection.
TeamProjectCollectionLibraryShare:{ * | teamProjectCollectionHostShareName}
Name: teamProjectHostShareName Required. The name to assign to the library share in the team project.
Description: teamProjectHostGroupDescription Optional. A description of the team project library share.
NoPrompt Optional. Do not prompt the user for confirmation.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

In the first example, all the library shares in the team project collection are assigned to each of the team projects in the collection. In the second example, one library share in the team project collection is assigned to a specific team project.

REM First example
TFSLabConfig CreateTeamProjectLibraryShare 
    /collection:http://abc:8080/TFS/Collection0
    /TeamProject:*
    /TeamProjectCollectionLibraryShare:*

REM Second example
TFSLabConfig CreateTeamProjectLibraryShare 

    /collection:http://abc:8080/TFS/Collection0
    /TeamProject:Project1
    /TeamProjectCollectionLibraryShare:tpcls1
    /name:ls1

DeleteTeamProjectHostGroup

Use the DeleteTeamProjectHostGroup command to remove the assignment of a host group from an individual team project. Host groups specify one or more physical machines that are the deployment targets for virtual environments in Visual Studio Lab Management.

Host groups are created in System Center Virtual Machine Manager (SCVMM). In Lab Management, host groups are assigned to one or more team project collections and then to one or more team projects in the collections. The DeleteTeamProjectHostGroup command does not remove the assignment of the host group to the team project collection.

Required Permissions:

To use the DeleteTeamProjectHostGroup command, you must have Delete Lab Locations permission for the Team Project host group. By default, Team Foundation Server Administrators, Team Project Collection Administrators and Team Project Administrators have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig DeleteTeamProjectHostGroup
      /Collection:collectionUrl
      /TeamProject:{* |teamProjectName>}
      /Name:{* |teamProjectHostGroupName}
      [/NoPrompt]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject:{ * | teamProjectName} Required. The name of the team project from which you want to remove the host group. Use quotation marks if there are spaces in the name. Use an asterisk (*) to specify all team projects in the team project collection.
Name: teamProjectHostGroupName Required. The name of the host group to delete from a team project. Use quotation marks if there are spaces in the name. Use an asterisk (*) to specify all host groups in the team project.
NoPrompt Optional. Do not prompt the user for confirmation.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

In the first example, all the host groups assigned to each of the team project in the team project collection are removed. In the second example, one host group is removed from a specific team project.

REM First example
TFSLabConfig DeleteTeamProjectLibraryShare
    /collection:http://abc:8080/TFS/DefaultCollection
    /teamProject:*
    /name:*

REM Second example
TFSLabConfig DeleteTeamProjectLibraryShare
    /collection:http://abc:8080/TFS/DefaultCollection
    /teamProject:Project1
    /name:hg1

DeleteTeamProjectLibraryShare

Use the DeleteTeamProjectLibraryShare command to remove the assignment of a library share from an individual team project. A library share provides access to file-based resources for virtual environments such as ISO images and virtual hard disks., Library shares are created by System Center Virtual Machine Manager (SCVMM). In Visual Studio Lab Management,??library shares are assigned to one or more team project collections and then to one or more team projects in the collections. The DeleteTeamProjectLibraryShare command does not remove the assignment of the library share to the team project collection.

Required Permissions:

To use the DeleteTeamProjectLibraryShare command, you must have Delete Lab Locations permission for that Team Project Library Share. By default, members of the Team Foundation Server Administrators, Project Collection Administrators and Team Project Administrators groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig DeleteTeamProjectLibraryShare
Collection:collectionUrl
      /TeamProject:{* |teamProjectName}
      /Name:{* |teamProjectLibraryShareName}
      [/NoPrompt]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject:{ * | teamProjectName} Required. The name of the team project that contains the library share that you want to delete. Use quotation marks if there are spaces in the name. Use an asterisk (*) to specify all team projects in the team project collection.
Name: teamProjectHostGroupName Required. The name of the library share to delete from a team project. Use quotation marks if there are spaces in the name. Use an asterisk (*) to specify all library shares of the team project.
NoPrompt Optional. Do not prompt the user for confirmation.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

In the first example, all the library shares assigned to each of the team project in the team project collection are removed. In the second example, one library share is removed from a specific team project.

REM First example
TFSLabConfig DeleteTeamProjectLibraryShare
    /collection:http://abc:8080/TFS/DefaultCollection
    /teamProject:*
    /name:*

REM Second example
TFSLabConfig DeleteTeamProjectLibraryShare
    /collection:http://abc:8080/TFS/DefaultCollection
    /teamProject:Project1
    /name:ls1

ListTeamProjectCollectionHostGroups

Use the ListTeamProjectCollectionHostGroups command to list the System Center Virtual Machine Manager (SCVMM) host groups that are assigned to a team project collection and that you have read access to. These collection host groups can be added to a team project by using the CreateTeamProjectHostGroup command. For more information, see TFSLabConfig CreateTeamProjectHostGroup Command.

Required Permissions:

To use the ListTeamProjectCollectionHostGroups command, you must have View Lab Resources permission at the Team Project collection level. By default, members of the TFS Administrators and Team Project Collection Administrators groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig ListTeamProjectCollectionHostGroups
      /Collection:collectionUrl

Parameter

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

TFSLabConfig ListTeamProjectCollectionHostGroups
    /collection:http://abc:8080/TFS/Collection0

ListTeamProjectCollectionLibraryShares

Use the ListTeamProjectCollectionLibraryShares command to list the library shares that have been assigned to a team project collection and that you have read access to. Library shares are created in System Center Virtual Machine Manager (SCVMM). and are assigned to a team project collection by using the TFSConfig Lab /LibraryShare Commands. Team project collection library shares can be added to a team project by using the CreateTeamProjectLibraryShare command. For more information, see TFSLabConfig CreateTeamProjectLibraryShare Command.

Required Permissions:

To use the ListTeamProjectCollectionLibraryShares command, you must have View Lab Resources permission at the Team Project collection level. By default, members of the TFS Administrators and Team Project Collection Administrators groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig ListTeamProjectCollectionLibraryShares
Collection:collectionUrl

Parameter

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

TFSLabConfig ListTeamProjectCollectionLibraryShares
    /collection:http://abc:8080/TFS/Collection0

ListTeamProjectHostGroups

Use the ListTeamProjectHostGroups command to list the host groups that are assigned to a team project and that you have read access to.

Required Permissions:

To use the ListTeamProjectHostGroups command, you must have View Lab Resources permissions at the Team Project level. By default, members of the Team Foundation Server Administrators, Team Project Collection Administrators, Team Project Administrators, Team Project Contributors, and Team Project Readers groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig ListTeamProjectHostGroups
Collection:collectionUrl
      /TeamProject:teamProjectName

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject: teamProjectName Required. The name of the team project. Use quotation marks if there are spaces in the name.

Example

For increased readability in the example, command options are listed on separate lines. In a command prompt window, type all options for a command on the same line.

TFSLabConfig ListTeamProjectHostGroups
    /collection:http://abc:8080/TFS/DefaultCollection
    /teamProject:Project1

ListTeamProjectLibraryShares

Use the ListTeamProjectLibraryShares command to list all library shares that are assigned to a team project and that you have access to.

Required Permissions:

To use the ListTeamProjectLibraryShares command, you must have the View Lab Resources permission at Team Project level. By default, members of the TFS Administrators, Team Project Collection Administrators, Team Project Administrators, Team Project Contributors, and Team Project Readers groups have this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig ListTeamProjectLibraryShares
Collection:collectionUrl
      /TeamProject:teamProjectName

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
TeamProject: teamProjectName Required. The name of the team project. Use quotation marks if there are spaces in the name.

Permissions

Use the TFSLabConfig Permissions command to set and get permissions set for a specified user or for multiple users on a specified object in Visual Studio Lab Management. For more information about individual permissions, see the Lab Management Permissions section of Permission reference for Team Foundation Server.

Required Permissions:

To query permissions on an object, you must have Read permissions for the object. To change permissions on an object the Permissions command, you must have the Manage Permissions permission. By default, the creator of the object has this permission. For more information, see Permission reference for Team Foundation Server.

TFSLabConfig Permissions
      /Collection:collectionUrl
      [objectSpec]
      {[/User:userName1[,userName2][,...]]
      [/Group:groupName1[,groupName2][,...]]}
      [/Allow:{* |perm1[,perm2][,...] }] 
      [/Deny:{* |perm1[,perm2][,...]}]
      [/Remove:{* |perm1[,perm2][,...]}]
      [/Inherit:Yes|No]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
objectSpec Optional. Specifies the target object such as a team project or library share to which the permissions are applied. For information about how to specify objects, see objectSpec below.
User: userName1[,userName2][,...] Optional. Specifies one or more users to which the permissions are applied. Use commas to separate multiple user names.
Group: groupName1[,groupName2][,...] Optional. Specifies one or more groups to which the permissions are applied. Use commas to separate multiple group names.
Allow: {* | perm1[,perm2][,...] } Optional. Enables the specified permissions for the specified users or groups. Use an asterisk () to specify all permissions. To specify an individual permission, use the identifiers in the **Name at command line* column of the table in the Lab Management Permissions section of Permission reference for Team Foundation Server. Use commas to separate multiple permissions.
Deny:{* | perm1[,perm2][,...] } Optional. Denies the specified permissions for the specified users or groups. Use an asterisk () to specify all permissions. To specify an individual permission, use the identifiers in the **Name at command line* column of the table in the Lab Management Permissions section of Permission reference for Team Foundation Server. Use commas to separate multiple permissions.
Remove:{* | perm1[,perm2][,...] } Optional. Unsets the specified permissions that were previously granted or denied to the user or group. To specify an individual permission, use the identifiers in the Name at command line column of the table in the Lab Management Permissions section of Permission reference for Team Foundation Server. Use commas to separate multiple permissions.
Inherit:Yes | No Optional. If you specify yes, all permissions associated with a parent ACL are inherited by an item. Cannot be combined with the /remove, /user, or /group options.

objectSpec

You can specify the objects that you want to include in the TFSLabConfig Permissions command in two ways:

  • Use one or more locations options to specify the object in the Lab Management hierarchy.

  • Use the /Url option to specify the object as a Uri.

If the objectSpec parameter option is not specified, the permissions are applied to all objects in the team project collection.

Object type options

The following table lists the valid combination of options that you can use to specify an object as the objectSpec parameter of a TFSLabConfig permissions command.

To set permissions on Use these options
A specific host group in a team project collection /TeamProjectCollectionHostGroup: teamProjectCollectionHostGroupName
A specific library share in a team project collection /TeamProjectCollectionLibraryShare: teamProjectCollectionLibraryShareName
All group hosts in a team project /TeamProject: projectName /TeamProjectHostGroup: *
A group host in a team project /TeamProject: projectName /TeamProjectHostGroup:teamProjectHostGroupName
A lab environment in a host group for a team project /TeamProject: projectName /TeamProjectHostGroup: teamProjectHostGroupName /LabEnvironment:labEnvironmentName
All library shares in a team project /TeamProject: projectName /TeamProjectLibraryShare: *
A library share in a team project /TeamProject: projectName /TeamProjectLibraryShare:teamProjectLibraryShareName
A lab template in a library share of a team project /TeamProject: projectName /TeamProjectLibraryShare: teamProjectLibraryShareName /LabTemplate: labTemplateName
A lab environment in a library share of a team project /TeamProject: projectName /TeamProjectLibraryShare: teamProjectLibraryShareName /LabEnvironment: labEnvironmentName

URL

Use the following syntax to specify the objectSpec target object of a TFSLabConfig permissions command by using the /Url option:

/url:VSTFS:///LabManagement/ objectType / objectId

The objectId is the unique numeric identifier of the object.

The following table lists the valid keywords for the objectType keyword:

Object Type Description
TeamProjectCollectionHostGroup A host group of a team project collection
TeamProjectCollectionLibraryShare A library share of a team project collection
TeamProject A team project
TeamProjectHostGroup A host group of a team project
TeamProjectLibraryShare A library share of a team project
LabTemplate A virtual machine or template in a team project library share
LabEnvironment An environment that is deployed on a team project host group or stored in a team project library share.

Permissions

You can specify one or more of Lab Management permissions as the target of the /Allow, /Deny, or /Remove options. For a lists of available permissions, see the Lab Management Permissions section of the Permission reference for Team Foundation Server topic.

  • Use an asterisk (*) to specify all lab permissions.

  • Use commas to separate multiple permissions.

Remarks

If neither the /User or /Group option is specified, the current permissions of the specified object is displayed.

If the objectSpec parameter option is not specified, the permissions are applied to all objects in the team project collection.


TCPHostGroup

Note: These commands only work on SCVMM 2012 server, and are not supported on SCVMM 2008 R2 server.

Use the TPCHostGroup command to add or remove a host group from a team project collection, or to modify the Lab Management settings of the host group.

To run these commands, you must be a member of Team Project Collection Administrators group in Team Foundation Server for the collection you specify. In addition, you must be a member of Administrator or Delegated Administrator role in the SCVMM Server from which you are adding the host groups. Furthermore, you must ensure that no other team project collection in any Team Foundation Server is already using the same SCVMM host group.

TfsLabConfig TPCHostGroup 
      /collection:collectionUrl
      [/add 
            /scvmmhostgroup:scvmmHostGroupPath
            /name:name
            [/dnssuffix:dnsSuffixForNetworkIsolation]
            [/autoprovision:{True|False}]]
      [/delete 
            /name:name
            [/noprompt]]
      [/edit 
            /name:hostGroupName
            [/autoprovision:{True|False}]
            [/dnssuffix:dnSuffixForNetworkIsolation]
            [/noprompt]]
      [/list]
      [/listscvmmhostgroups]

Parameters

Option Description
Collection:collectionUrl Required. The URL of the team project collection on the application tier of Team Foundation Server that contains the team project. For example, /collection:http://abc:8080/TFS/DefaultCollection.
add Adds the specified host group to the team project collection. You must specify the /collection, /scvmmhostgroup, and name options with /add.
scvmmhostgroup: scvmmHostGroupPath Required with /add. Specifies the fully qualified domain name (FDQN) of the VMM host group. The FQDN path can be found by using the VMM Admin Console.
name: hostGroupName Required with /add. Specifies the name of the host group in the team project collection.
dnsSuffix: dnsSuffixForNetworkIsolation Optional with /add or /edit. Specifies the DNS suffix that will be used to register the names of virtual machines on the isolated network for the virtual environments within this host group. To confirm that the suffix is configured correctly in the DNS hierarchy, contact your network administrator.
autoProvision : True | False Optional with /add or /edit. Specifies whether the host group is automatically assigned to each team project in the collection. By default, /autoProvision is set to True, and host group is automatically assigned to every team project in the collection. Note: The /autoProvision option affects existing team projects.
Delete Removes the specified host group from the team project collection. You must specify the /collection and /name options.
noPrompt Optional with /add, /edit, or /delete. Suppresses display progress and result data from the command window.
edit Changes the Lab Management settings of the host group. You must specify the /collection and /name options.
list Lists all host groups that are assigned to the specified team project collection.
listVmmHostGroups Lists all host groups that are available in VMM.

Example

In this example, a host group is added to a team project collection:

TFSLabConfig TPCHostGroup
      /collection:http://abc:8080/TFS/Collection0
      /name:HostGroup1

TPCLibraryShare

Note: These commands only work on SCVMM 2012 server, and are not supported on SCVMM 2008 R2 server.

Use the TPCLibraryShare command to add or remove a library share from a team project collection, or to modify the lab management settings of the library share.

To run these commands, you must be a member of Team Project Collection Administrators group in Team Foundation Server for the collection you specify. In addition, you must be a member of Administrator or Delegated Administrator role in the SCVMM Server from which you are adding the host groups. Furthermore, you must ensure that no other team project collection in any Team Foundation Server is already using the same SCVMM library share.

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]

Parameters

Option Description
Collection:collectionUrl Required. Specifies the URL of the team project collection on the application-tier of the Team Foundation Server.
add Adds the specified library share to the team project collection. You must specify the /collection, /scvmmlibraryshare, and /name options with /add.
scvmmLibraryShare: vmmLibrarySharePath Required with /add. Specifies the fully qualified domain name (FQDN) of the VMM share. The FDQN path can be retrieved by using the VMM Admin Console.
name: libraryShareName Required with /add, /edit, and /delete. Specifies the name of the library share in the team project collection.
autoProvision:True | False Optional with /add or /edit. Specifies whether the library share is automatically assigned to each team project in the collection. By default, /autoProvision is set to True, and library share is automatically assigned to every team project in the collection. The /autoProvision option only affects existing team projects.
Delete Removes the specified library share from the team project collection. You must specify the /collection and /name options.
noPrompt Optional with /add, /edit, or /delete. Suppresses display progress and result data from the command window.
edit Changes Lab Management settings of the library share. You must specify the /collection and /name options.
list Lists all library shares that are assigned to the specified team project collection.
listscvmmlibraryshares Lists all library shares that are available in VMM.

Example

In this example, a library share is added to a team project collection.

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

TPHostGroup

Note: These commands only work on SCVMM 2012 server, and are not supported on SCVMM 2008 R2 server.

Use the TPHostGroup command to assign or unassign a host group from a team project collection to individual team projects in the collection. Host groups specify one or more physical machines that are the deployment targets for virtual environments in Visual Studio Lab Management..

To run these commands, you must be a member of Team Project Collection Administrators group in Team Foundation Server for the collection you specify. In addition, you must be a member of Administrator or Delegated Administrator role in the SCVMM Server from which you are adding the host groups.

TfsLabConfig TPHostGroup 
      /collection:collectionUrl
      /teamProject:* | teamProjectName
      [/add 
            /teamProjectCollectionHostGroup:* | teamProjecctCollectionHostGroupFQDN
            /name:teamProjectHostGroupName
            [/description:description]
            [/NoPrompt]]
      [/delete 
            /name:* | teamProjectHostGroupName
            [/noprompt]]
      [/list]

Parameters

Option Description
Collection:collectionUrl Required. Specifies the URL of the team project collection on the application-tier of the Team Foundation Server.
teamProject: * | teamProjectName The name of the team project to which to add or delete host groups. Use quotation marks if there are spaces in the name. Use an asterisk (* ) to assign the specified host group to all team projects in the collection.
add Adds the specified host group to the team projects.
teamProjectCollectionHostGroup: teamProjectCollectionHostGroup The name of the host group in the team project collection. Use quotation marks if there are spaces in the name. Use an asterisk (*) to assign all host groups in the collection to the specified team project.
name: hostGroupName Tthe name of the host group in the team project collection.
Delete Removes the host group from the team project.
noPrompt Suppresses display progress and result data from the command window.
list Lists all host groups that are assigned to the specified team project.

Example

In this example, all the host groups in the team project collection are assigned to all the team projects in the collection:

TFSLabConfig TPHostGroup /add
      /collection:http://abc:8080/TFS/Collection0
      /teamProject:*
      /teamProjectCollectionHostGroup:NORTHAMERICA\hostgroup1
      /name:HostGroup1

TPLibraryShare

Note: These commands only work on SCVMM 2012 server, and are not supported on SCVMM 2008 R2 server.

Use the TPLibraryShare command to assign or unassign a library share from a team project collection to an individual team project in the collection. A library share provides access to file-based resources for virtual environments such as ISO images and virtual hard disks. Library shares are created in System Center Virtual Machine Manager (SCVMM) and assigned to project collection by Visual Studio Lab Management.

To run these commands, you must be a member of Team Project Collection Administrators group in Team Foundation Server for the collection you specify. In addition, you must be a member of Administrator or Delegated Administrator role in the SCVMM Server from which you are adding the host groups.

TfsLabConfig TPLibraryShare
      /collection:collectionUrl
      /teamProject:* | teamProjectName
      [/add 
            /teamProjectCollectionLibraryShare:* | teamProjectCollectionLibraryShare
            /name:teamProjectLibraryShareName
            [/noprompt]]
      [/delete 
            /name:* | teamProjectLibraryShareName
            [/noprompt]]
      [/list]

Parameters

Option Description
Collection:collectionUrl Required. Specifies the URL of the team project collection on the application-tier of the Team Foundation Server.
add Assigns the specified library share to the team project.
teamProjectCollectionLibraryShare: teamProjectCollectionLibraryShare The name of the team project collection library share.
name: libraryShareName Tthe name of the library share.
Delete Removes the specified library share from the team project collection.
noPrompt Suppresses display progress and result data from the command window.
list Lists all library shares that are assigned to the specified team project collection.