Register-PSRepository and Register-PackageSource

Welcome Forums General PowerShell Q&A Register-PSRepository and Register-PackageSource

This topic contains 1 reply, has 2 voices, and was last updated by

1 year, 4 months ago.

  • Author
  • #81910

    Points: 1
    Rank: Member

    to setup my internal powershell gallery I would use:

    Register-PSRepository -Name myPSgallery -SourceLocation https://myurl -PublishLocation https://myurl

    when and why I would want to run the following:

    Register-PackageSource -ProviderName PowerShellGet -Name myPSGallery -Location https://myurl2

    I'm not sure what it does exactly in this case? Is it adding additional location for packages to the one specified with -SourceLocation earlier or is this something else entirely?

  • #81911

    Points: 1
    Rank: Member

    A PS Repository is sort of a subset of a package source using just the PowerShellGet Provider. If you run get-packagesource you'll see PSGallery listed with a ProviderName of PowerShellGet. If you register an internal powershell gallery via Register-PSRepository you'll see that listed in Get-PackageSource as well, also with a PowerShellGet Provider. If you're strictly dealing with powershell modules in your internal repository I don't believe you ever need to do anything with Register-PackageSource.

The topic ‘Register-PSRepository and Register-PackageSource’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort