Thoughts, ideas, ramblings. Covering a wide range of topics from Windows to Linux, Azure, hardware, software & more.

Using Azure DevOps Artifact Feed in PowerShell

Your Artifact Feed URL can be used as a PackageSource in PowerShell for Install-Package.

Note that the URL provided when pressing Connect to Feed has a v3 when only v2 appears to work at this time.

Credentials can be a Personal Access Token (PAT) with your email and PAT key. Requires Packaging (Read).

  • XXXXX is your Organization Name
  • YYYYY is your Project Name (Project Scoped Only)
  • ZZZZZ is your Feed Name
$credentials = Get-Credentials

Register-PackageSource -Trusted -ProviderName "PowerShellGet" -Name "MyGallery" -Location "" -Credential $credentials

Installing a package from the feed

When installing a specific package, you can pass the same Credentials object as you used above.

Install-Package <PackageName> -Credential $credentials


Leave a Reply

Your email address will not be published. Required fields are marked *