Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Azure DevOps Server |Azure DevOps Server |Azure DevOps Server 2022 | Azure DevOps Server 2020
You can use the TFSConfig command-line tool to perform a variety of administrative actions for your Azure DevOps on-premises deployment.
TFSConfig can be run from any machine on which Azure DevOps Server has been installed.
Command-line tool location
Azure DevOps command line tools are installed in the /Tools directory of an Azure DevOps application-tier server.
- Azure DevOps Server 2020:
%programfiles%\Azure DevOps Server 2020\Tools - Azure DevOps Server 2019:
%programfiles%\Azure DevOps Server 2019\Tools - TFS 2018:
%programfiles%\Microsoft Team Foundation Server 2018\Tools - TFS 2017:
%programfiles%\Microsoft Team Foundation Server 15.0\Tools - 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
Prerequisites
For many commands to operate correctly, TFSConfig will need to be able to connect to the various servers and services which are part of your TFS deployment, and the user running TFSConfig will need to have administrative permissions for these same servers and services. Requirements for specific commands will be called out below.
Many TFSConfig command must be run from an elevated Command Prompt, even if the running user has administrative credentials. To open an elevated Command Prompt, click Start, right-click Command Prompt, and then click Run as Administrator. For more information, see: User Account Control.
You can also perform administrative actions interactively using the administration console for Azure DevOps Server. See Administrative task quick reference.
List commands and get help
To display a full list of TFSConfig commands, use the help command:
TFSConfig help
To get help for an individual command, use the help command and specify the name of the command with which you want help. For example, to get help for the accounts command:
TFSConfig help accounts
Accounts
AddProjectReports
Note
The addProjectReports command is available with TFS 2017.1 and later versions.
Authentication
Certificates
ChangeServerID
CodeIndex
Collection
ColumnStoreIndex
Note
Command availability: Requires TFS 2015.2 and later versions.
ConfigureMail
Configure the server that runs Azure DevOps Server to use an existing SMTP server for email alerts.
TfsConfig configureMail /Enabled:<true|false> /FromEmailAddress:<emailAddress> /SmtpHost:<SMTPHostName>
| Option | Description |
|---|---|
| FromEmailAddress | Specifies the address from which to send email notifications from Azure DevOps Server for a check in, work item assigned to you, or other notifications. This address is also checked for validity and, depending on your server configuration, might have to represent a valid email account on the mail server. If the address does not exist or is not valid, the default email address is used. |
| SmtpHost | Specifies the name of the server that hosts the mail server. |
Prerequisites
To use the configureMail command, you must be a member of the Team Foundation Administrators security group on the Azure DevOps application-tier server. For more information, see Permission reference for Azure DevOps Server
Remarks
You can also use the administration console to configure Azure DevOps Server to use an SMTP server.
Example
The following example shows the syntax used to configure the from email address to TFS@contoso.com and the SMTP mail server as ContosoMailServer:
TfsConfig configureMail /FromEmailAddress:TFS@contoso.com /SmtpHost:ContosoMailServer
DBCompression
DeleteTestResults
DeploymentPool
Identities
Jobs
OfflineDetach
Proxy
RebuildWarehouse
RegisterDB
RemapDBs
RepairJobQueue
Settings
Setup
You use the setup command to uninstall features which are currently configured on the machine where you run the command.
TfsConfig setup /uninstall:<feature[,feature,...]>
Option
Description
/uninstall
Specifies one or more features to be uninstalled from the machine where you run the command. Options include: All, ApplicationTier, Search, and VersionControlProxy.
Prerequisites
To use the setup command, you must be a member of the Azure DevOps Administrators security group.
Examples
The following example uninstalls all Azure DevOps Server features from the current machine.
TfsConfig setup /uninstall:All
The following example uninstalls the application tier and build features from the current machine.
TfsConfig setup /uninstall:ApplicationTier