locked
Installing a package manually RRS feed

  • Question

  • Hi All.

    I am trying to install a package onto a server that is not on the internet, and its shocking how little information there is out there.

    Its a .nupkg file and I would be grateful if anyone can provide a step by step guide and lastly, I would like to know if this can be included as a windows build template for virtual machines, this way no need to manually install all the time, it just comes as part of the OS build.

    The module is sqlserver.21.1.18102.nupkg

    https://www.powershellgallery.com/packages/Sqlserver/21.1.18102

    Thanks.


    Monday, April 8, 2019 8:44 AM

All replies

  • You are asking a question that has nothing to do with PowerShell.  Please go to the Nuget forum and read the instructions on how to install and use nuget packages.

    This forum is for PowerShell and not for developer tools or systems.

    If you actually search you will find hundreds of articles that explain nuget.

    https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools


    \_(ツ)_/

    Monday, April 8, 2019 3:55 PM
  • Hi,

    Thanks for your question.

    1. Run "Install-module sqlserver" to install the sqlserver module on a machine that can be networked. 

    2. Go to path "C:\Program Files\WindowsPowerShell\Modules\SqlServer" to copy the folder to your destination server.

    3. Import the module from a local path.

    Import-Module -Name "D:\21.1.18102\SqlServer.psd1" -Verbose

    Also, the SQLPS module is included with SQL Server installation.

    https://docs.microsoft.com/en-us/sql/powershell/download-sql-server-ps-module?view=sql-server-2017

    Best regards,

    Lee


    Just do it.

    Tuesday, April 9, 2019 3:10 AM
  • The SQLServer module can be saved using "Save-Module".  The module is SQLServer andhas nothung to do with SQLPS which  is an old a deprecated module. 

    To install this module you will need to set up a local repository on the non-Internet server or network and save the module to that repository.  From there you can install it on any machine.

    Do not try to install SQLPS. SQLPS is not SQLServer and does not provide the same capabilities.


    \_(ツ)_/

    Tuesday, April 9, 2019 3:17 AM
  • Actually.  The newest SQLServer module is now independent and can just be copied to the local modules folder.  It also contains support for PS 5 and PS 6.1 so it has to be fully stand-alone  Just use Save-Module to a DVD or USB drive and copy it to the target system.


    \_(ツ)_/

    Tuesday, April 9, 2019 3:20 AM
  • Thank you. You 're right.

    Just do it.

    Tuesday, April 9, 2019 3:30 AM
  • Hi MrFlinstone,

    Please refer the link below:

    https://www.mssqltips.com/sqlservertip/4993/new-features-and-best-practices-of-sql-server-powershell/

    Best regards,

    Lee


    Just do it.

    Tuesday, April 9, 2019 3:31 AM
  • Hi,

    Was your issue resolved?

    If you resolved it using our solution, please "mark it as answer" to help other community members find the helpful reply quickly.

    If you resolve it using your own solution, please share your experience and solution here. It will be very beneficial for other community members who have similar questions.

    If no, please reply and tell us the current situation in order to provide further help.

    Best Regards,

    Lee


    Just do it.

    Wednesday, April 10, 2019 9:09 AM