Accessing your PowerShellget repository from another machine

So far the new PowerShellGet repository has been accessed from the local machine. You need to register the new repository on each machine from which you want to access it.

Register-PSRepository -Name PowerShellModules -SourceLocation http://W12R2DSC:81/nuget/PowerShellModules -InstallationPolicy Trusted

The only change to is substituting the name of the server for localhost in the source location URI.

NOTE: you will need to ensure that the Windows firewall is either off or allows the appropriate traffic through to the server hosting you repository

You can use the new repository

PS C:\Windows\system32> Get-PSRepository | ft Name, SourceLocation -AutoSize

Name              SourceLocation
—-              ————–
PowerShellModules http://w12r2dsc:81/nuget/PowerShellModules

And see the modules

PS C:\Windows\system32> Find-Module -Name Pester | ft -a

Version Name   Repository        Description
——- —-   ———-        ———–
3.2.0   Pester PSGallery         Pester provides a framework
3.2.0   Pester PowerShellModules Pester provides a framework

And install modules

PS C:\Windows\system32> Install-Module -Name pester -Repository PowerShellModules

PS C:\Windows\system32> Get-Module -ListAvailable pest* | ft -a

    Directory: C:\Program Files\WindowsPowerShell\Modules

ModuleType Version Name   ExportedCommands
———- ——- —-   —————-
Script     3.2.0   Pester {Describe, Context, It, Should…}

This entry was posted in PowerShell v5, PowerShellGet. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s