Connect-TfsConfigurationServer
Connects to a configuration server.
Table of Contents
Syntax
Cached credentials
Connect-TfsConfigurationServer
[-Server] <object>
-Cached
[-Passthru]
User name and password
Connect-TfsConfigurationServer
[-Server] <object>
[-UserName] <string>
[-Password <SecureString>]
[-Passthru]
Credential object
Connect-TfsConfigurationServer
[-Server] <object>
-Credential <object>
[-Passthru]
Personal Access Token
Connect-TfsConfigurationServer
[-Server] <object>
-PersonalAccessToken <string>
[-Passthru]
Prompt for credential
Connect-TfsConfigurationServer
[-Server] <object>
[-Interactive]
[-Passthru]
Description
A TFS Configuration Server represents the server that is running Team Foundation Server. On a database level, it is represented by the Tfs_Configuration database. Operations that should be performed on a server level (such as setting server-level permissions) require a connection to a TFS configuration server. Internally, this connection is represented by an instance of the Microsoft.TeamFoundation.Client.TfsConfigurationServer. NOTE: Currently it is only supported in Windows PowerShell.
Examples
Example 1
Connects to the TFS server specified by the URL in the Server argument
PS> Connect-TfsConfigurationServer -Server http://vsalm:8080/tfs
Example 2
Connects to a previously registered TFS server by its user-defined name “vsalm”. For more information, see Get-TfsRegisteredConfigurationServer
PS> Connect-TfsConfigurationServer -Server vsalm
Parameters
Specifies that cached (default) credentials should be used when possible/available.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies a user account that has permission to perform this action. To provide a user name and password, a Personal Access Token, and/or to open a input dialog to enter your credentials, call Get-TfsCredential with the appropriate arguments and pass its return to this argument.
Type | object |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Prompts for user credentials. Can be used for any Team Foundation Server or Azure DevOps account - the proper login dialog is automatically selected. Should only be used in an interactive PowerShell session (i.e., a PowerShell terminal window), never in an unattended script (such as those executed during an automated build). Currently it is only supported in Windows PowerShell.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Returns the results of the command. By default, this cmdlet does not generate any output.
Type | SwitchParameter |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies a password for authentication modes (such as Basic) that support username/password-based credentials. Must be used in conjunction with the -UserName argument
Type | SecureString |
Position | 2 |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
-PersonalAccessToken (Aliases: Pat)
Specifies a personal access token, used as an alternate credential, to authenticate to Azure DevOps
Type | string |
Position | (Named) |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Specifies either a URL/name of the Team Foundation Server to connect to, or a previously initialized TfsConfigurationServer object. When using a URL, it must be fully qualified. To connect to a Team Foundation Server instance by using its name, it must have been previously registered.
Type | object |
Position | 0 |
Default Value | (N/A) |
Accept pipeline input | True (byvalue) |
Accept wildcard characters | False |
Specifies a user name for authentication modes (such as Basic) that support username/password-based credentials. Must be used in conjunction with the -Password argument
Type | string |
Position | 1 |
Default Value | (N/A) |
Accept pipeline input | False |
Accept wildcard characters | False |
Inputs
System.Object
Specifies either a URL/name of the Team Foundation Server to connect to, or a previously initialized TfsConfigurationServer object. When using a URL, it must be fully qualified. To connect to a Team Foundation Server instance by using its name, it must have been previously registered.