Skip to main content
Skip table of contents

Advance SQL Error - Installing the NuGet package provider

Overview

When the Cloudamize Windows Agent or Agentless Data Collector (ADC) attempts to collect Advanced SQL Data, it may need to install the SqlServer PowerShell module. This process requires the NuGet package provider. If the system cannot reach the required Microsoft repositories, the following error will appear in the MS SQL Data Collection Status column:

Exit code = 1. Output: Installing the NuGet package provider. WARNING: Unable to download from URL 'https://go.microsoft.com/fwlink/?LinkID ~~~ Check your internet connection.

Root Cause

The collector is unable to download the NuGet provider because the connection to Microsoft’s package delivery endpoints is blocked by a firewall, proxy, or lack of internet access on the target machine.

Troubleshooting Steps option 1:

Firewall & Proxy Whitelisting

Ensure the target server (or the ADC machine) has outbound access to the following URLs:

  • https://go.microsoft.com

  • https://onegetcdn.azureedge.net

To verify the second URL specifically: Run the following PowerShell command with the verbose flag to see exactly where the connection is failing:

CODE
Install-PackageProvider -Name 'NuGet' -MinimumVersion '2.8.5' -Scope CurrentUser -Verbose

Manual Installation via PowerShell

If the automatic installation fails, you can manually trigger the installation while ensuring the correct security protocols (TLS 1.2) are active.

Scenario A: Direct Internet Connection (No Proxy)

Run this command in an elevated PowerShell window:

CODE
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
Install-PackageProvider -Name 'NuGet' -MinimumVersion '2.8.5' -Scope CurrentUser -Force -ErrorAction Stop;

Scenario B: Behind a Proxy Server

If your environment uses a proxy, you must define it within the session:

CODE
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12;
# Set your proxy details below
$proxyUrl = "http://your_proxy.com:8443"
[System.Net.WebRequest]::DefaultWebProxy = New-Object System.Net.WebProxy($proxyUrl, $true);
[System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials;

# Install using the proxy flag
Install-PackageProvider -Name 'NuGet' -MinimumVersion '2.8.5' -Proxy $proxyUrl -Scope CurrentUser -Force -ErrorAction Stop;

Troubleshooting Steps Option 2

If standard troubleshooting (TLS settings/Proxy) does not work, you must manually sideload the NuGet provider DLL into the Windows file system.

Manual "Offline" Installation of NuGet Provider

Follow these steps if your security policy blocks the automated SSL handshake or if you receive a "No match found" error when trying to point to a local .exe or .zip file.

Step 1: Download the Provider DLL

  1. On a machine with internet access, download the official Microsoft NuGet provider DLL:

    Microsoft.PackageManagement.NuGetProvider-2.8.5.208.dll

  2. Transfer this .dll file to the target server using your approved file transfer method.

Step 2: Create the Required Directory Structure

PowerShell requires the provider to exist in a specific versioned folder hierarchy. You must create this manually:

  1. Open File Explorer as an Administrator.

  2. Navigate to (or create) the following path:

    C:\Program Files\PackageManagement\ProviderAssemblies\

  3. Inside ProviderAssemblies, create a subfolder named nuget.

  4. Inside nuget, create another subfolder named 2.8.5.208.

  5. Final Path: C:\Program Files\PackageManagement\ProviderAssemblies\nuget\2.8.5.208\

Step 3: Place, Rename, and Unblock the File

  1. Move the downloaded .dll into the 2.8.5.208 folder.

  2. Rename the file to exactly: Microsoft.PackageManagement.NuGetProvider.dll

  3. Unblock the File: Right-click the .dll file > Properties > Check the Unblock box at the bottom > OK.

    (Note: If you skip this, Windows security will prevent PowerShell from loading the provider.)

Step 4: Verify the Installation

Open a new PowerShell window as an Administrator and run:

CODE
Get-PackageProvider -Name NuGet

If successful, the NuGet provider will be listed with version 2.8.5.208.

Step 5: Install the SQL Server Module (Offline Method)

Now that the NuGet "engine" is installed, you can install the SqlServer module from a local directory if the server remains offline:

  1. Place your downloaded SqlServer.nupkg into a folder (e.g., C:\LocalRepo).

  2. Register the folder as a trusted source:

    CODE
    Register-PSRepository -Name LocalSource -SourceLocation "C:\LocalRepo" -InstallationPolicy Trusted
  3. Install the module:

    CODE
    Install-Module -Name "SqlServer" -Repository LocalSource

If the issue persists, please capture a screenshot of the error output and collect the log_backup.txt file from the directory:
For ADC: C:\Program Files (x86)\CloudamizeAgentlessDc\log_backup.txt

For Agent: C:\Program Files (x86)\Cloudamize\log_backup.txt

Please attach both the screenshot and the log file in an email to helpdesk@cloudamize.com for further investigation.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.