PowerShell Gallery alternatives

This topic contains 9 replies, has 4 voices, and was last updated by Profile photo of Stefan Werner Stefan Werner 7 months, 2 weeks ago.

  • Author
    Posts
  • #38108
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    Just wondering what the best way would be to acquire modules and DSC resources in an environment where downloading via cmdlets (save-module, etc.) is blocked. I use the gallery at home, but the DoD seems to have this blocked, so it isn't accessible to me at work where I need it most.

    I know I can get some things from the Technet Script Center (https://gallery.technet.microsoft.com/scriptcenter), but given the popularity of the PowerShell Gallery, I doubt people will be keeping the script center up to date.

  • #38109
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    I see the PowerShell team has their resources up on GiHub.

    https://github.com/powershell/

  • #38110
    Profile photo of Dave Wyatt
    Dave Wyatt
    Moderator

    You can set up your own private NuGet server that acts just like the PowerShell Gallery. Most recently, they've set up this repo, though it's in Preview status: https://github.com/PowerShell/PSPrivateGallery . There's an older blog post here as well: https://blogs.msdn.microsoft.com/powershell/2014/05/20/setting-up-an-internal-powershellget-repository/

  • #38113
    Profile photo of Don Jones
    Don Jones
    Keymaster

    GitHub isn't the right spot; that's the developer branch of the code, not necessarily the stable release. Dave's right – an internal repo (which will be easy to set up, soon), and you can go out-of-office to acquire content, bring that content in, and load it into your private repo.

  • #38114
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    Thanks guys, I have played around with the preview of the private gallery. We were looking at using this for sharing some of internal scripts/modules. Was hoping there might be an option that would not require me to get content off site, but it seems like that might be a dead end.

  • #38120
    Profile photo of Don Jones
    Don Jones
    Keymaster

    Well, thing is, you guys aren't blocking the cmdlets, you're blocking sites, proabbly via your firewall or proxy. So there might be galleries out there that people have set up, which you're not blocking, but only you'd be able to find out what those are, and they'd likely not include the same modules as the main PSGallery.

  • #38129
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    Right, web access for all elevated accounts is blocked via proxy. So the cmdlets are a no go, unless the source is internal. Was looking to download certain resources the old school way – via the browser. I can get to PowerShellGallery.com, but there doesn't appear to be a conventional download link, and the script center seems to be nearly a year out of date for most things.

    I appreciate your help, but it seems that my only real option (as usual) is to download at home and sneaker-net it over.

  • #38130
    Profile photo of Don Jones
    Don Jones
    Keymaster

    What about using a non-elevated account just to do the download, with the destination being some internal repo? I could even see a script, run under non-elev privileges, to "mirror" PSGallery on a weekly basis or whatever.

  • #38131
    Profile photo of Henry Buckle
    Henry Buckle
    Participant

    If you just want to download the .nupkg file from powershellgallery.com using the browser then the link format is as follows
    https://www.powershellgallery.com/api/v2/package/PackageName/Version
    e.g.
    https://www.powershellgallery.com/api/v2/package/ISESteroids/2.4.0.44

    You can then install it using Install-Package, or upload it to an internal repository

  • #38162
    Profile photo of Stefan Werner
    Stefan Werner
    Participant

    Thanks Henry, that is exactly what I was looking for. That works.

You must be logged in to reply to this topic.