'How to install SQL Server PowerShell module on my company's server

Environment:

  • Windows 2016 Server Standard
  • PowerShell 5
  • Has Internet connection
  • Running PowerShell as administrator
  • JFrog is something new we're implementing but not sure if fully on server or not. I know very little about it.

When I try to run the following:

Install-Module -Name SqlServer  

I get following prompt:

PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories

I answer yes to the prompt and get the following error:

WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.

WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. WARNING: Unable to download the list of available providers. Check your internet connection. PackageManagement\Get-PackageProvider : Unable to find package provider 'NuGet'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable'.

What is going on?

I tried:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 
Get-PackageProvider -Name Nuget -Force

I got the following:

Get-PackageProvider -Name nuget -Force WARNING: MSG:UnableToDownload «go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «» WARNING: Unable to download the list of available providers. Check your internet connection. WARNING: Unable to download from URI 'go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. Get-PackageProvider : Unable to find package provider 'nuget'. It may not be imported yet. Try 'Get-PackageProvider -ListAvailable

Update

PS C:\Windows\system32> Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force

WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «» WARNING: Unable to download the list of available providers. Check your internet connection. WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''. Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags. At line:1 char:1

  • Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
  •   + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider)
    

[Install-PackageProvider], Excepti on + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider

PS C:\Windows\sy

Update 2:

enter image description here

Update 3:

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source