PowerShell for Windows Admins

Jan 5 2015   10:33AM GMT

Accessing your PowerShellget repository from another machine

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

Tags:
Powershell

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…}

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

Share this item with your network: