Skip to content

Instantly share code, notes, and snippets.

#Requires -Version 3
#Requires -RunAsAdministrator
<#
.SYNOPSIS
Downloads and installs an Azure Pipelines Agent on the current machine,
and registers it with the specified Azure Devops organization, project, and environment.
.DESCRIPTION
This cmdlet downloads an Azure Pipelines Agent on the current machine, installs it to C:\azagent,
and finally runs the .\config.cmd command, which registers the agent with the specified