This repository contains PowerShell scripts for auditing and analyzing Azure DevOps (ADO) extensions, tasks, and pipelines. These tools help you understand what extensions are installed in your organization, what permissions they have, and what tasks are being used in your pipelines.
- PowerShell 5.1 or higher
- Azure DevOps access token with appropriate permissions
- Environment variables set up:
ADO_ORGANIZATION: Your Azure DevOps organization nameADO_PAT: Your Personal Access Token
Before running the scripts, set up your environment variables:
# Windows PowerShell
$env:ADO_ORGANIZATION = "your-organization-name"
$env:ADO_PAT = "your-personal-access-token"
# Or on macOS/Linux with PowerShell Core
$env:ADO_ORGANIZATION = "your-organization-name"
$env:ADO_PAT = "your-personal-access-token"This script audits installed extensions in your Azure DevOps organization.
What it does:
- Lists all installed extensions
- Shows the scopes (permissions) requested by each extension
- Provides descriptions of the scopes from a dictionary
- Lists contributions made by each extension
How to run:
./auditADOExtensions.ps1How it works:
- Connects to the Azure DevOps Extensions API
- Retrieves a list of installed extensions
- For each extension, fetches detailed information
- Matches scopes with descriptions from the dictionary (
dict.csv) - Outputs the results to the console
This script audits tasks provided by extensions in your Azure DevOps organization.
What it does:
- Lists all tasks registered in your organization
- Shows task names, versions, and their contributor identifiers
How to run:
./auditADOExtensionTasks.ps1How it works:
- Connects to the Azure DevOps Distributed Task API
- Retrieves a list of all registered tasks
- Outputs task details including name, contributor identifier, and version
This script analyzes which tasks are actually being used in your Azure DevOps pipelines.
What it does:
- Lists all projects in the organization
- Lists all pipelines in each project
- Generates YAML previews of each pipeline
- Extracts and lists tasks used in each pipeline
How to run:
./auditADOPipelinesTasks.ps1How it works:
- Connects to the Azure DevOps Projects API to get all projects
- For each project, retrieves all pipelines
- For each pipeline, generates a YAML preview
- Parses the YAML to find task references in the format
task: TaskName@Version - Outputs the tasks used in each pipeline
The dict.csv file contains a mapping of Azure DevOps permission scopes to their descriptions. This is used by the extensions audit script to provide readable descriptions of the permissions requested by each extension.
If you encounter errors:
- Verify your environment variables are set correctly
- Ensure your PAT has sufficient permissions:
- For extensions audit:
vso.extensionandvso.extension.datascopes - For pipelines audit:
vso.buildandvso.projectscopes - For tasks audit:
vso.buildscope
- For extensions audit:
- Check your network connectivity to Azure DevOps
- Set
$DebugPreference = "Continue"(already in scripts) to see detailed debug output
- The scripts have debug output enabled by default. To disable, set
$DebugPreference = "SilentlyContinue"in the scripts. - Results are output to the console. To save to a file, use PowerShell redirection:
./scriptName.ps1 > results.txt