Download PowerShell Module for Server Offline

Welcome Forums General PowerShell Q&A Download PowerShell Module for Server Offline

This topic contains 5 replies, has 4 voices, and was last updated by

 
Participant
2 months, 2 weeks ago.

  • Author
    Posts
  • #111656

    Participant
    Points: 0
    Rank: Member

    Hello all ^^

    I'would like to do a script with ScheduleTask cmdlet on a server who do not have the cmdlet, so i would to Import the module , but i don't know how....

    It is easy to do if the server have the Net but if not, i really don't know how to download a module, i don't find any site, even Microsoft.

     

    If you know, pls help 😉

     

    Thx for replay 😉

  • #111667

    Keymaster
    Points: 1,704
    Helping HandTeam Member
    Rank: Community Hero

    If the module is available in PowerShell Gallery, you could use Install-Module on a connected computer, and simply file copy the module to the non-connected computer.

    If the module is not available on PowerShell Gallery, then you would need to manually install the module. For example, the RSAT can be used to install many Windows Server modules on a client computer.

    If you were more specific about the module you're writing about, it would be easier to provide a more specific answer.

  • #111682

    Participant
    Points: 318
    Helping Hand
    Rank: Contributor

    To see all modules from the MS powershell gallery

    Find-Module -Name *
    (Find-Module -Name *).Count
    
    # Results
    3222
    
    # Use a GUI to select to save and install one or more modules.
    
    Find-Module -Name * | 
    Out-GridView -Title 'Select a module to download and install. Use Shift + Right Click to choose one or more' -PassThru | 
    Save-Module -Path "$env:USERPROFILE\Documents\WindowsPowerShell\Modules" -Verbose
    
    

    To save a module to your local system

    Save-Module -Name SomeModuleName -Path $env:USERPROFILE\Documents\WindowsPowerShell\Modules
    

    Once you save the module, you can just copy that entire module folder to any other computer you want.

    To install a module

    Install-Module -Name SomeModuleName
    

    Outside of module to leverage, there is a second feature to PowerShell package management via this.

    Find-Package -Name *
    (Find-Package -Name *).Count
    
    # Results
    3206
    

    Resources:

    PowerShell Module and Package Managment is built into Win10 and higher, otherwise you need to download it, and you must be on PwoerShell 3-4+ to use it.

    Introducing PackageManagement in Windows 10
    https://blogs.technet.microsoft.com/packagemanagement/2015/04/28/introducing-packagemanagement-in-windows-10

    Package Management for PowerShell Modules with PowerShellGet

    PackageManagement PowerShell Modules Preview – March 2016

    Supported Operating System

    Windows 7 Service Pack 1, Windows 8.1, Windows Server 2008 R2 SP1, Windows Server 2012, Windows Server 2012 R2

    • Windows Server 2012 R2
    • Windows 8.1 Pro
    • Windows 8.1 Enterprise
    • Windows Server 2012
    • Windows 7 SP1
    • Windows Server 2008 R2 SP1

    https://www.microsoft.com/en-us/download/details.aspx?id=51451

    Package​Management

    This topic displays help topics for the Package Management Cmdlets.
    https://docs.microsoft.com/en-us/powershell/module/packagemanagement/?view=powershell-6

    About PackageManagement
    PackageManagement is an aggregator for software package managers.
    https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_packagemanagement?view=powershell-6

    Package Management Preview for PowerShell 4 & 3 is now available

    Setting up an Internal PowerShellGet Repository

    Creating a PowerShellGet repository

    Powershell: Your first internal PSScript repository
    https://kevinmarquette.github.io/2017-05-30-Powershell-your-first-PSScript-repository

  • #111700

    Participant
    Points: 0
    Rank: Member

    Hello you ^^,

     

    Oh i don't know the RSAT have some modules, thx Jones 😉

    Wouaw what an amazing replay so nice Postanote 😉

    Thx i will try that and come back to you .

  • #111715

    Participant
    Points: 289
    Helping Hand
    Rank: Contributor

    One further thing bears mention.

    You can download a module without installing it locally using Save-Module, should you need to save it to a network share or some such and want to copy from there to install it on subsequent machines.

     

  • #112694

    Participant
    Points: 0
    Rank: Member

    Wouaw thx so much for your replay 😉

     

    I could'nt replay to you before i was in Hollande and without any device with internet.

    Yesterday, i success to download some modules but  i haven't any server who have internet.

    And my computer at works doesn't have the Save-Module cmdlet.

    I will try later with the way of Postanote 😉

     

    Thx all 😉

You must be logged in to reply to this topic.