When running the Azure CI Pipeline, you must create and configure Azure DevOps Pipelines Agent. Its primary step is to establish a connection to the computer where you want to run your DevOps Continuous Integration (CI) pipeline.
Note
For Azure DevOps pipelines that use dbForge Studio, configure the Azure DevOps agent service to run under the account that installed and activated the tool. Ensure that this account has the required permissions to access the SQL Server instances used in the CI process.
Here is the Azure CI Pipeline workflow with a Microsoft-hosted agent and a self-hosted agent.

A Microsoft-hosted agent and a self-hosted agent are bound to manage the pipeline execution.
When you use a Microsoft-hosted agent, the job runs in a preconfigured environment on Azure (Windows, macOS, or Ubuntu). This environment is deployed to Azure on demand (provided as SaaS).
When you use a self-hosted agent, the job runs on your physical or virtual machine (on-premise environment).
The primary difference between a Microsoft-hosted agent and a self-hosted agent is that a Microsoft-hosted agent provides a preconfigured virtual machine in the cloud with a pre-installed operating system (Windows, macOS, or Ubuntu).
The following table shows the main comparative characteristics of the two agents.
| Microsoft-hosted agent | Self-hosted agent |
|---|---|
| Provides pre-configured virtual machine images (for example, macOS, Ubuntu, and Windows images with Visual Studio). | Runs on your own computer or virtual machine. |
| Some images include a wide range of pre-installed tools and software (for example, Visual Studio, browsers, SDKs, and other utilities). | You decide which tools and software to install. |
| Virtual machine images are updated regularly with the latest patches and updates. | You keep track of installing and maintaining updates and patches. |
| You cannot modify the hardware configuration (CPU, memory, storage). | You can modify the hardware configuration (CPU, memory, SSD/HDD, and so on). |
| You can install additional software during a pipeline run, for example, by using a package manager or scripts. | You control which software is installed and when it is updated. |
| Each pipeline run uses a clean virtual machine. After the run completes, Azure discards the machine. | You are responsible for cleaning up artifacts and maintaining the environment between pipeline runs. |
You can get information about the pre-installed software or hardware for a specific MS-agent using PowerShell. For example, to receive information about software and hardware for MS-Agent and a Windows-2019 image, execute the following PowerShell script.
"Shows details of the currently running computer"
$computerSystem = Get-CimInstance CIM_ComputerSystem
$computerBIOS = Get-CimInstance CIM_BIOSElement
$computerOS = Get-CimInstance CIM_OperatingSystem
$computerCPU = Get-CimInstance CIM_Processor
$computerHDD = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID = 'C:'"
Clear-Host
Write-Host "System Information for: " $computerSystem.Name
"Manufacturer: " + $computerSystem.Manufacturer
"Model: " + $computerSystem.Model
"Serial Number: " + $computerBIOS.SerialNumber
"CPU: " + $computerCPU.Name
"HDD Capacity: " + "{0:N2}" -f ($computerHDD.Size/1GB) + "GB"
"HDD Space: " + "{0:P2}" -f ($computerHDD.FreeSpace/$computerHDD.Size) + " Free (" + "{0:N2}" -f ($computerHDD.FreeSpace/1GB) + "GB)"
"RAM: " + "{0:N2}" -f ($computerSystem.TotalPhysicalMemory/1GB) + "GB"
"Operating System: " + $computerOS.caption + ", Service Pack: " + $computerOS.ServicePackMajorVersion
"User logged In: " + $computerSystem.UserName
This script returns the following information about the virtual machine:

To find out what programs are pre-installed for a Windows image, create a PowerShell step with the following script:
"Get a list of installed programs:"
Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize
This script returns a list of pre-installed programs.

For small projects with fast downloads, builds, and tests, a Microsoft-hosted agent can be used. It provides an up-to-date, pre-configured virtual machine, and each pipeline run starts with a clean environment that Azure discards after completion.
If you have specific performance, security, or network requirements, use a self-hosted agent. This option gives you full control over the environment, but you are responsible for system updates and cleaning up artifacts between pipeline runs.
1. Under Agent pool, select Azure Pipelines.

2. Under Agent Specification, select a required virtual machine image.
These are all steps you need to perform to get your CI Pipeline running on the required virtual machine image delivered as SaaS.
Note
To install a self-hosted agent, download the agent.
1. Navigate to the Agent pools page of your Azure organization and click New Agent.

2. Select the operating system and click Download.

3. Extract the downloaded ZIP file to the folder on your disk.
4. Run config.cmd as an administrator.

You will be prompted to enter the server URL for Azure DevOps Services – specify https://dev.azure.com/{yourOrganizationName}.

5. When you’re prompted for your authentication type, press Enter.
6. Enter your personal access token.
Tip
For more information on creating tokens, see Self-hosted Windows agents.
7. When you’re prompted to enter an agent pool, press Enter to use the default pool.
8. Enter the agent name, for example, vmagentvm.
9. When you’re prompted to enter your work folder, press Enter.
If required, specify the name.
10. When you’re prompted to enter the run agent as a service (Y or N), enter Y.
Note
If you select
Y(recommended), the agent will run as a service and start automatically when the operating system boots.If you select
N, the agent will run as a regular process and must be started manually.
11. When you’re prompted to enter a user account to use for the service, specify a fully qualified name of the service account, for example, DomainName\AccountName. Then press Enter.
12. Enter the password for the service account and press Enter.
After that, you will see a message about successful configuration:

The agent appears in the list on the Default page of the Agent pools section.

When you select Default pool for your pipeline, the pipeline will run on the computer where the agent is installed.
