How to Download Files from Azure DevOps Repos from a PowerShell Script

Guillermo Musumeci
3 min readApr 10, 2020

Sometimes, we need to execute or download a script locate on a private Azure DevOps Repo.

In this story, we will learn how to use a Personal Access Token (PAT) to download a file from private repo located on Azure DevOps.

Creating a Personal Access Token (PAT)

The first step is to create a PAT.

Login into Azure DevOps and click on the User Settings menu located on the top right. Then click on the Personal access tokens menu.

Then we click on the New Token button.

Then we enter the name, set the expiration and configure the scope:

Finally, we copy the token and store it in a safe place. We will not able to see it again.

--

--

Guillermo Musumeci
Guillermo Musumeci

Written by Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌

Responses (3)