This repository contains of a Powershell module that can help with connecting to and maintaining DevOps Artifacts Feed connections. This module is created because the current version of PowerShellGet has some limitations with connecting to DevOps Artifacts Feeds. This should be fixed in a later release of PowerShellGet. See notes within function Register-DevOpsFeed.
When using msbuild, NuGet.exe and/or dotnet Azure Artifacts Credential Provider is GA.
This module is available on the PowerShell Gallery and can be installed like so:
PS> Install-Module -Name DevOpsFeedHelper -Scope CurrentUser
If the module was installed via Install-Module
it can be conveniently updated
from an elevated PowerShell:
PS> Update-Module -Name DevOpsFeedHelper
You should start with setting up the feed context. This can be done through:
PS> Set-DevOpsFeedContext -OrganizationName "Contoso" -ProjectName "MyFirstProject" -FeedName "PrivateFeed"
Next step is setting up credentials. This can be done with the following code. Enter your PAT when password is requested.
PS> $Cred = Get-Credential
PS> Set-DevOpsFeedCredential -Username $Cred.GetNetworkCredential().UserName -PatToken $Cred.GetNetworkCredential().Password
Now you can register the DevOps Feed with the context created in the previous step. Do this by using:
PS> Register-DevOpsFeed
You can now close the current session (or not) and still keep the connection with the DevOps Artifacts feed. To check a list of available modules within the feed you can use:
PS> Find-DevOpsFeedModule
Install a specific module by entering:
PS> Install-DevOpsFeedModule -Name "My.PublishModule"
The module is documented through PS help. This is resonably readable with the
PowerShell command Get-Help
.
For example:
PS> Get-Help about_DevOpsFeedHelper
PS> Get-Help Register-DevOpsFeed -Online
If you found an issue with the module or want to suggest and enhancement, head over to the Issues page on GitHub and submit a bug report or enhancement request. Make sure to also check the wiki for tips and the FAQ first.
- Install-Module - Download one or more modules from an online gallery, and installs them on the local computer.
- Update-Module - Downloads and installs the newest version of specified modules from an online gallery to the local computer.
- PowerShellGet - a package manager for Windows PowerShell.
DevOpsFeedHelper
on the Powershell Gallery.