TFSLabConfig CreateTeamProjectLibraryShare Command

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.


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 
      /TeamProject:{* |teamProjectName}
      /TeamProjectCollectionLibraryShare:{* |teamProjectCollectionLibraryShareName} 





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 all library shares in the collection to the specified team project.

TeamProjectCollectionLibraryShare:{* |teamProjectCollectionLibraryShareName}

Required. The name of the library share in the team project collection. Use an asterisk (*) to create a team project library share for all library shares in the team project collection.


Required. The name to assign to the library share in the team project.


Optional. A description of the team project library share.


Optional. Do not prompt the user for confirmation.


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 

REM Second example
TFSLabConfig CreateTeamProjectLibraryShare 

See Also


TFSLabConfig ListTeamProjectCollectionLibraryShares Command

TFSLabConfig ListTeamProjectLibraryShares Command

TFSLabConfig DeleteTeamProjectLibraryShare Command


TFSConfig Lab Command Reference

Configure TFS using the administration console [redirected]

TFSLabConfig Command Reference

Configure and administer Lab Management