header image

Accessing your PowerShellget repository from another machine

Posted by: | January 5, 2015 Comments Off on 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
—-              ————–
PSGallery         https://www.powershellgallery.com/api/v2/
MSPSGallery       http://search.microsoft.com/default.aspx
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…}

under: PowerShell v5, PowerShellGet

Comments are closed.