Register-PSRepository (PowerShellGet) - @parameters

PHOTO EMBED

Tue Aug 13 2024 15:07:58 GMT+0000 (Coordinated Universal Time)

Saved by @baamn

$parameters = @{
  Name = "myNuGetSource"
  SourceLocation = "https://www.myget.org/F/powershellgetdemo/api/v2"
  PublishLocation = "https://www.myget.org/F/powershellgetdemo/api/v2/Packages"
  InstallationPolicy = 'Trusted'
}
Register-PSRepository @parameters
Get-PSRepository

Name                SourceLocation          OneGetProvider       InstallationPolicy
----                --------------          --------------       ------------------
PSGallery           http://go.micro...      NuGet                Untrusted
myNuGetSource       https://myget.c...      NuGet                Trusted
content_copyCOPY

https://learn.microsoft.com/en-us/powershell/module/powershellget/register-psrepository?view