Configures Lab Management in the Team Foundation Server application tier and manages System Center Virtual Machine Manager ...

Configures Lab Management in the Team Foundation Server application tier 
and manages System Center Virtual Machine Manager (VMM) host group and
library share assignments for a team project collection. Use the 
/settings, /libraryShare, hostGroup, /dns, or /delete options to target
an object or operation in Lab Management. See the option descriptions 
below for the required and optional syntax.
        
    TfsConfig lab /settings      Assign the System Center Virtual 
                                 Machine Manager (VMM) that will be used 
                                 by Lab Management and the network 
                                 location that will be used for virtual 
                                 machines. Optionally create network 
                                 isolated environments.
    TfsConfig lab /libraryShare  Add, remove, or modify all or specified 
                                 library shares in a team project collection
    TfsConfig lab /hostGroup     Add, remove, or modify all or specified 
                                 host groups in a team project collection
    TfsConfig lab /dns           Add or remove specified DNS records that 
                                 were created by TFS.
    TfsConfig lab /delete        Deletes all lab objects in a specified 
                                 team project collection.

    TfsConfig lab /settings  
                    [[/scvmmservername:]
                    [/networklocation:]
                     [/ipblock:
                    [/dnssuffix:]
                    [/labUrl:]
                     [/noprompt]]
                    [/list]
    TfsConfig lab /libraryShare /collectionName:
                <[/add /scvmmLibraryShare: 
                        /name: 
                        [/autoprovision:{True|False}]]
                    [/delete /name: 
                        [/noprompt]]
                    [/edit /name: 
                        [/autoprovision :{True|False}] 
                        [/noprompt]]
                    [/list] 
                    [/listscvmmlibraryshares]>                          
    TfsConfig lab /hostGroup /collectionName:
                <[/add /scvmmhostgroup: 
                        /name: 
                        [/labenvironmentplacementpolicy: 
                                  {Conservative|Aggressive}]
                        [/dnssuffix:]
                        [/autoprovision:{True|False}]]
                    [/delete /name: 
                        [/noprompt]]
                    [/edit /name: 
                      [/autoprovision:{True|False}] 
                      [/labenvironmentplacementpolicy: 
                                  {Conservative|aggressive}]
                      [/dnssuffix:]
                    [/noprompt]]
                    [/list] 
                    [/listscvmmhostgroups]>
    TfsConfig lab /delete /collectionName: 
                    [/external] [/noprompt]
    TfsConfig lab /dns /add|/delete|/list /name: 
                                          /ip:
    TfsConfig lab /dns /add|/delete|/list 
                    [/collectionName: 
                    [/teamProject: 
                    [/labenvironment:]]]

Description:-
/settings
    The /settings options specifies the System Center Virtual Machine 
    Manager (VMM) that will be used by Lab Management and the network 
    location that will be used for virtual machines. Other options 
    enable you to configure network isolation. Network isolation 
    allows you to run multiple copies of a lab environment at the same 
    time without causing network conflicts, such as conflicts in 
    computer names and Domain Name System (DNS) registration. 
    
    Use the following options with the /settings option:
        /scvmmServerName:
            Optional. Specifies the name of the System Center Virtual 
            Machine Manager (VMM) server that will be used by Team 
            Foundation Server (TFS) to manage the virtual machines. 
            To enable TFS to communicate with VMM, you must add the 
            account under which TFS is running to the Administrator 
            role in VMM.
        /networkLocation: 
            Optional. Specifies a network location that is available on 
            all the hosts in your lab network. Virtual machines that are
            provisioned by Lab Management will be connected to the 
            specified network location during deployment. You can find
            the available network locations on a host by using 
            VMM Administrator Console. 
        To set up Lab Management from the command line, both the 
        /scvmmServerName and the /networkLocation options must be specified.
        You can specify the two options on the same command line or on
        separate command lines.
        
        /ipBlock:
            Optional. Specifies the range of IP addresses to be assigned to
            the virtual machines in an environment when an isolated network
            is created. Because the IP addresses are used only for internal
            routing among virtual machines and are not exposed beyond the
            boundaries of an environment, you can specify any IP range that
            is not used within your public network. 
        /dnsSuffix:< dns suffix for network isolation>
            Optional. Specifies the DNS suffix that will be used to register
            the names of virtual machines on the isolated network for the
            virtual environment. To confirm that the suffix is configured
            correctly in the DNS hierarchy, contact your 
            network administrator.
        To configure network isolation from the command line, both the
        /ipBlock and the /dnsSuffix options must be specified. You can 
        specify the two options on the same command line or on separate
        command lines.
        
        /labURL:
            Optional. Specifies the Team Foundation Server URL that will 
            be used by build agents which are auto-configured by Lab 
            Management. We recommend you use the fully-qualified domain name 
            (FQDN) in this URL to avoid communication problems when the 
            virtual machine is not on the same domain as the server running 
            Team Foundation Server. The default value for this is equal to 
            the 'NotificationUrl' converted to a FQDN format. 

        To restore the default value for labUrl from the command line, specify 
        an empty value for labUrl. To override the labUrl for any team project 
        collection, specify the collectionName parameter.
        
/libraryShare
    The /libraryShare options manage library shares in a team project 
    collection. The /libraryShare options let you assign a library share
    to a team project collection, remove an assignment, or modify 
    Lab Management properties of the library share.

    Use one of  the /Add, /Delete, /Edit, /List, or /ListScvmmLibraryShares 
    options with the /libraryShare option on a command line. Some options 
    require that you include additional options.
        /Add
            Adds the specified library share to the team project collection.
            You must specify the /collectionName, /scvmmLibraryShare, and 
            /name options with Add.
        /Delete
            Removes the specified library share from the team project 
            collection. You must specify the /collectionName and /name 
            options with /Delete.
        /Edit
            Sets or clears the AutoProvision property of the library shares. 
            You must specify the /collectionName and /name options with /Edit.
        /List
            Lists all library shares that are assigned to the specified team 
            project collection. 
        /ListSCVMMLibraryShares
            Lists all library shares that are available in Virtual 
            Machine Manager.
        /collectionName:
            Required. Specifies the name of the team project collection on the 
            application-tier Team Foundation Server.
        /name:
            Required with /Add, /Edit, and /Delete. Specifies the name of the 
            library share in the team project collection.
        /scvmmLibraryShare:
            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.
        /autoProvision:{True|False}
            Optional with /Add; required with /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 shares are automatically assigned to team projects in
            a collection. 
            Note: This the /autoProvision option affects existing team projects. 
        /noPrompt
            Optional with /Add, /Edit, or /Delete. When specified, does not
            display progress and result data in the command window.

/hostGroup
    The /hostGroup option is used to manage host groups for a team project
    collection. The /hostGroup options lets you assign a host group to a
    team project collection, remove an assignment, or modify Lab Management
    properties of the host group. Use one of the /Add, /Delete, /Edit, 
    /List, or /ListVmmHostGroups options with the /hostGroup option on a 
    command line. Some options require that you include additional options.
        /Add
            Adds the specified host group to the team project collection.
            You must specify the /collectionName, /scvmmHostGroupPath, 
            and /name options with /Add.
        /Delete 
            Removes the specified host group from the team project 
            collection. You must specify the /collectionName and /name
            options with /Delete.
        /Edit
            Changes one or both of the AutoProvision and 
            LabEnvironmentPlacementPolicy properties of the host group. 
            You must specify the /collectionName and /name options with /Edit.
        /List
            Lists all host groups that are assigned to the specified team 
            project collection. 
        /ListVmmHostGroups
            Lists all host groups that are available in Virtual Machine Manager.
        /collectionName:
            Required. Specifies the name of the team project collection on the 
            application-tier Team Foundation Server.
        /scvmmHostGroup:
            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:
            Required with /Add. Specifies the name for the host group in the 
            team project collection.
        /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 groups are 
            automatically assigned to team projects in a collection. 
            Note: The /autoProvision option affects existing team projects.
        /labEnvironmentPlacementPolicy:{Conservative|Aggressive}
            Optional with /Add or /Edit. Specifies how Lab Management treats
            the physical machines in a host group on which it deploys new
            virtual lab environments. 
            Conservative (Default). Considers non-running virtual environments
            in deployment decisions. This includes all virtual machines which
            are part of environments which are in "Stopped" state as well.
            Aggressive. Does not consider non-running virtual environments 
            in deployment decisions.
        /noPrompt
            Optional with /Add, /Edit, or /Delete. When specified, does not
            display progress and result data in the command window.
        /dnsSuffix:< dns suffix for network isolation>
            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.

/dns
    The /DNS option lets you manage DNS records that were created by 
    Team Foundation Server (TFS) through Lab Management. Every time that 
    a network isolated environment is created, TFS generates a unique computer 
    name for each virtual machine in the environment. The computer name is 
    then registered in DNS. The addition of these records happens automatically. 
    You must manage these records with the /dns option only in situations such 
    as (i) changing the service account under which TFS runs or (ii) moving a 
    project collection from one TFS server to another. 
    Use one of the /Add, /Delete, or /List options with the /dns option on a 
    command line. Some options require that you include additional options.
        /Add
            Adds new records in DNS. The computer names and IP addresses of all 
            virtual machines that meet the selection criteria are registered in DNS. 
            For more information about selection criteria, see selection options 
            below. The /Add option can be applied only to environments that are 
            in a running state.
        /Delete
            Removes records from DNS. The computer names and IP addresses of all 
            virtual machines that meet the selection criteria are unregistered 
            from DNS. For more information about selection criteria, see the 
            selection options below. The /Delete option must be applied by using
            the account that created the records in DNS, for example, the service
            account under which TFS is running.
        /List
            Lists the DNS records created by TFS for environments that meet the
            selection criteria. For more information about selection criteria, 
            see the options below.
        /noPrompt
            Optional with /Add, /Edit, or /Delete. When specified, does not 
            display progress and result data in the command window.
            Selection options. For each of the previous /dns operations, 
            you can target the DNS entries in one of two ways. Use the Lab 
            Management object hierarchy options to specify the DNS entries 
            of an object in the hierarchy. You must specify the complete 
            hierarchy of parent objects if you use this method. Use the /name 
            and /ip options to specify the fully qualified doman name and IP 
            address of an individual entry. If no selection criteria is specified,
            then the option is applied to all virtual machines of all network 
            isolated environments that belong to all project collections in 
            the Team Foundation Server.
        /collection:
            Specifies a team project collection to which the /dns option is 
            applied. If the /teamProject option is not specified, the option 
            is applied to all network isolated environments in the 
            team project collection.
        /teamProject:
            Specifies the name of a team project in a team project collection 
            to which the /dns option is applied. If the /labEnvironmentUri option
            is not specified, the option is applied to all network isolated
            environments in the specified team project. You must specify the
            /collection option with the /teamProject option.
        /labEnvironmentUri: 
            Specifies the uri of the environment in a team project that to which
            the DNS option is applied. You must specify the /collection and
            /teamProject options with the /labEnvironmentUri option. Use the
            uri format vstfs:///LabManagement/LabEnvironment/.
            You can view the lab environment id in the Environment Viewer of
            Microsoft Test Manager or from the XML description of the
            virtual machine in SCVMM Admin Console.
        /name:
            Specifies the fully qualified domain name that the /dns option
            targets. The /ip option must be specified with the /name option. 
        /ip:
            Specifies the IP address associated with the domain name that
            was specified in the /name option. The /name option must be
            specified with the /ip option. 

/delete
    Removes all lab objects for the specified team project collection.
    When the /external option is specified, /delete will also remove
    the objects from System Center Virtual Machine Manager (VMM).
    You must specify the /collection option with the /delete option.
        /collectionName:
            Required. Specifies the name of the team project collection on
            the application-tier Team Foundation Server.
        /external
            Optional. When specified, deletes the objects from VMM.
        /noPrompt
            Optional. When specified, does not display progress and result
            data in the command window.