![]() |
VOOZH | about |
Written by Vitalii Zaichenkoβ’ April 21, 2021β’ 13:26β’ Azure, Cloud, Tools & technologies
In the process of learning Azure DevOps, youβll face numerous challenges, but the most sophisticated of them is setting up the CI Pipeline to work appropriately.
The pivotal point is the Azure Pipelines Agent that establishes and monitors connection with the machine running the DevOps CI Pipeline. Though it is a regular practice, the procedure has its peculiarities. The current article will focus on them and explain how to choose the CI Pipeline agent and how to configure it correctly.
Have a look at the figure below. It demonstrates the interrelations between the Azure CI Pipeline workflow, the Microsoft-hosted agent, and a self-hosted agent.
You need to set up the pipeline to work in an operating environment, where the Microsoft-hosted agent and a self-hosted agent manage the execution of the tasks.
Note that the operating environment differs depending on the agent you use.
These are the most significant differences, but there are more of them. Letβs consider the distinction features more precisely.
Have a look at the below table describing the characteristics and differences of these two agents.
If you are using the MS-agent, you can clarify which software and hardware you have pre-installed using PowerShell. Execute the following script:
"Shows details of currently running PC"
$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
The following figure provides the information about your virtual machine:
To determine the programs are pre-installed for a Windows-2019 image, execute the following script in PowerShell:
"Get a list of installed programs:"Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate | Format-Table -AutoSize
The query returns the list of pre-installed programs. Note that the screenshot displays a part of that list due to its overall length:
The choice of this or that agent depends on the project you work with.
The configuring process for the Microsoft-hosted agent is straightforward:
The self-hosted agent establishes the connection with that machine running the DevOps CI pipeline. Thus, first of all, you have to install the self-hosted agent itself on that machine (your physical computer or a virtual machine).
Download the self-hosted agent. You can follow the below link and select and download the agent you need from there.
Another way is to use the Agent pools section in the Azure organization. There, click New Agent.
Select your OS and click Download.
Extract the ZIP file. In our case, we have created the dedicated vstsAgent folder, you can have your destination for the file. Have a look at the following screenshot:
Run the config.cmd file (as Administrator).
It will ask you to enter the server URL
The URL should be the following: https://dev.azure.com/{yourOrganizationName}.
The next step, press ENTER for the request of your authentication type:
On the next request to enter your token, paste it (see the screenshots below):
Enter agent pool β press Enter for using the default pool.
Enter agent name β enter the name of the chosen agent. In our case, it is vmagentvm.
Enter work folder β press Enter and specify the name is needed.
Enter run agent as service? (Y/N) β press Y.
Enter User account to use for the service* β press Enter.
The configuration process is complete:
Your agent will appear in the Agents section on the Default page too:
By selecting the Default pool option, you will set the pipeline to run on that machine with the installed agent.
While configuring the CI process, you might use additional software solutions. Weβd recommend using the dbForge DevOps Automation Azure DevOps plugin for SQL Server. It includes the steps for creating, testing, and deploying the artifact objects. Refer to the guideline on using this plugin efficiently.
In configuring the CI processes, you might use either an MS-agent or a self-hosted agent. The choice depends on the particular case, and now you know for sure when this or that solution is appropriate.
Though this article does not explore the Azure Pipelines Agent operating in-depth, we hope that it provided you with the basic information on choosing and configuring the right agent for the Azure Pipelines CI.
Tags: azure, devops, Microsoft Azure Last modified: November 03, 2022February 25, 2026β’ AWS, Constraints, JSON
February 25, 2026β’ Automation, Constraints, MySQL
February 25, 2026β’ Automation, MySQL, Oracle
February 25, 2026β’ Automation, Cloud, Containers
Comments are closed.
CodingSight is open for new authors and partnership proposals. Send your offers and ideas to [email protected] and we will get back to you at the earliest opportunity.
.net .net framework Always On AWS azure azure sql c# database database administration database backup database management database security entity framework excel execution plan full-text search indexes linked server linq linux Microsoft Azure mysql oracle performance power bi power bi reports query performance replication sql sql constraints sql database sql functions sql operator sql server sql server 2016 sql server 2019 ssis ssms stored procedure t-sql t-sql queries t-sql statements tips and tricks tools transaction log
