RESOLVED - TP4 -"Install-PackageProvider ContainerProvider" set-up script error RRS feed

  • Question

  • Hello everyone,

    If you are trying to get set up to use Windows Server Containers and Hyper-V Containers using our set-up script, you might see the error below. The script might fail while downloading the base OS images for containers. We are working to get this worked out as soon as possible. Please stay tuned.

    Thursday, November 19, 2015 4:34 PM


All replies

  • Hello again,

    We have successfully uploaded the Package Provider, and things should now be working. Thanks for your patience, and enjoy trying out containers in TP4.

    Thursday, November 19, 2015 7:31 PM
  • Still doesn't work. ContainerProvider hasn't been found.
    Friday, November 20, 2015 1:43 PM
  • Hi Ruslan,

    Are you running on a Server TP4 system? If so, can you please share the following information:

    1. Launch PowerShell.exe

    2. In the PowerShell.exe console, please run the following command and share me the output

        (a) Get-PSRepository

        (b) Find-Module ContainerProvider

        (c) Get-Module PowershellGet | % modulebase



    Windows PowerShell Team

    Friday, November 20, 2015 7:13 PM
  • Hi Krishna,

     (a) Get-PSRepository

    Name: PSGallery


    InstallationPolicy: Untrusted

    SourceLocation: powershellg.....

    (b) Find-Module ContainerProvider

    Version: 0.5.2

    Name: ContainerProvider

    Type: Module

    Repository: PSGallery

    Description: ContainerProvider

        (c) Get-Module PowershellGet | % modulebase

    output: C:\program Files\WindowsPowershell\Modules\PowershellGet\

    Tuesday, November 24, 2015 8:15 AM
  • Thanks for the response with details. As per the output from (b) in your response, you were able to find ContainerProvider Module. Can you try installing it using "Install-Module ContainerProvider" command instead of Install-PackageProvider. The rest of the steps like Find-ContainerImage, Install-ContainerImage should work after this.



    Tuesday, November 24, 2015 7:51 PM
  • I have installed a Windows server core with GUI (in a virtualbox VM) and trying to install containers using the script. I keep on getting the following error.

    Install-PackageProvider : No match was found for the specified search
    criteria for the provider 'ContainerProvider'. The package provider
    requires 'PackageManagement' and 'Provider' tags. Please check if the
    specified package has the tags.
    At C:\Install-ContainerHost.ps1:873 char:9
    +         Install-PackageProvider ContainerProvider -Force | Out-Null
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackagePr
       ovider:InstallPackageProvider) [Install-PackageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.

    C:\Install-ContainerHost.ps1 : Could not install ContainerProvider
    At line:1 char:1
    + C:\Install-ContainerHost.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorEx
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorExcep

    Then i tried following the steps here and this is my output.

    (a) Get-PSRepository

    PSGallery                 NuGet                     Untrusted            http


    PS C:\Windows\system32> Find-Module ContainerProvider

    NuGet provider is required to continue
    PowerShellGet requires NuGet provider version '' or newer to
    interact with NuGet-based repositories. The NuGet provider must be available
     in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
     You can also install the NuGet provider by running 'Install-PackageProvider
     -Name NuGet -MinimumVersion -Force'. Do you want PowerShellGet to
     install and import the NuGet provider now?
    [Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

    If i select Y i get the following error .

    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.
    At C:\Program
    + ...     $null = PackageManagement\Install-PackageProvider -Name $script:N
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackagePr
       ovider:InstallPackageProvider) [Install-PackageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.

    PackageManagement\Import-PackageProvider : No match was found for the
    specified search criteria and provider name 'NuGet'. Try
    'Get-PackageProvider -ListAvailable' to see if the provider exists on the
    At C:\Program
    + ...     $null = PackageManagement\Import-PackageProvider -Name $script:Nu
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (NuGet:String) [Import-PackagePr
       ovider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.

    PackageManagement\Get-PackageProvider : Unable to find package provider
    'NuGet'. It may not be imported yet. Try 'Get-PackageProvider
    At C:\Program
    + ... tProvider = PackageManagement\Get-PackageProvider -Name $script:NuGet
    +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (Microsoft.Power...PackagePro
       vider:GetPackageProvider) [Get-PackageProvider], Exception
        + FullyQualifiedErrorId : UnknownProviderFromActivatedList,Microsoft.Po

    Find-Module : NuGet provider is required to interact with NuGet-based
    repositories. Please ensure that '' or newer version of NuGet
    provider is installed.
    At line:1 char:1
    + Find-Module ContainerProvider
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: (:) [Find-Module], InvalidO
        + FullyQualifiedErrorId : CouldNotInstallNuGetProvider,Find-Module

    What might be going on ?


    Sunday, November 29, 2015 11:04 AM
  • Hi Vidh,

    Is it possible for you to check if there is internet connectivity in your virtual box VM? If there is connectivity, can  you please try the following command in a PowerShell console and send us the output:

    Install-PackageProvider -Name NuGet -MinimumVersion -Verbose -Force



    Wednesday, December 2, 2015 7:12 PM
  • Hi Krishna, 

    I think the problem was that our company firewall had some rule for downloading certain types of files. Looks like it did not like the files that were being downloaded from 

    However when i ran the command again from home (different network ) nuget did get installed. and i am able to work with docker containers. 

    Thanks a lot. 


    Thursday, December 3, 2015 10:52 AM
  • I am glad the problem is solved. Thanks for confirming Vidh!


    Friday, December 4, 2015 9:13 PM
  • Sorry to interrupt you.

    It is not resolved in my lab. I have installed Windows Container successfully with full GUI install but I have failed to install Windows Container with Server Core...orz

    Here is my environment.

    • Host OS: Windows Server 2012 R2
    • Guest OS: Windows Server 2016 TP4 (Server Core) <-- I try to install Windows Container on this.
    • Guest OS must use proxy server to access the Internet.
    • Guest OS uses NAT to go outside of Host OS.

    I have couple of questions.

    1. wget needs -Proxy option

    Even though I set up proxy server using "netsh winhttp" command, I need -Proxy option to run wget. 

    2. NuGet is missing...?

    I have got the following error on Server Core.

    PS C:\Container> Get-PSRepository
    WARNING: Unable to find module repositories.

    3. Install-Container.ps1 failed

    I have pasted the error log at the bottom of my reply.

    Any advice would be very welcome!

    Thank you :-)


    Install-Container error log

    PS C:\Container> .\Install-ContainerHost.ps1
    Querying status of Windows feature: Containers...
    Feature Containers is already enabled.
    Waiting for Hyper-V Management...
    Networking is already configured.  Confirming configuration...
    Installing ContainerProvider package...
    WARNING: Unable to download the list of available providers. Check your internet
    Install-PackageProvider : No match was found for the specified search criteria for the
    provider 'ContainerProvider'. The package provider requires 'PackageManagement' and
    'Provider' tags. Please check if the specified package has the tags.
    At C:\Container\Install-ContainerHost.ps1:873 char:9
    +         Install-PackageProvider ContainerProvider -Force | Out-Null
    +         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:Install
       PackageProvider) [Install-PackageProvider], Exception
        + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagem

    C:\Container\Install-ContainerHost.ps1 : Could not install ContainerProvider
    At line:1 char:1
    + .\Install-ContainerHost.ps1
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Write-Error], WriteErrorException
        + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Install-C

    Friday, December 11, 2015 4:28 AM
  • For everyone who is still searching for a solution.

    1. Get the OneGet assembly Microsoft.PackageManagement.NuGetProvider.dll from somewhere (I don't remember where I got mine from, but probably from another machine - you can alternatively try to get it from the OneGet project)

    Probably the hardest step :) Sorry, can't remember how I found it. Perhaps I can upload it somewhere, or the Containers team from MSFT could upload it for us somewhere here.

    2. Place it here: %ProgramFiles%\PackageManagement\ProviderAssemblies\nuget\\

    3. In PowerShell, execute Add-Type -Path %ProgramFiles%\PackageManagement\ProviderAssemblies\nuget\\Microsoft.PackageManagement.NuGetProvider.dll

    Run Install-ContainerHost.ps1 again, it should hopefully work now.

    Monday, February 8, 2016 3:54 PM
  • Hi Folks,

    For me the issue was PowerShell is using the .NET WebClient and this wasn't passing proxy credentials. Thsi also affects Update-Help

    Try the following

    $wc = New-Object System.Net.WebClient
    $wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
    Install-PackageProvider NuGet -MinimumVersion '' -Force 



    Friday, March 11, 2016 11:02 AM
  • Thank you very much, Ferdi and Michael. 

    Unfortunately, Lady Luck is NOT on my side ... :-<

    Something is wrong in my network. I can install Container on Windows Server 2016 with GUI but cannot install it on Windows Server 2016 Core installation. Even though I set up proxy with netsh command, I need "-Proxy" option to run wget command. I think I need something to run some Container cmdlets.

    BTW, now, I'm trying to find out the other way to install Container on Server Core. For example, download ContainerBaseImage.wim with the other machine, first. Second, copy it to Server Core machine and run Install-ContainerHost.ps1 with "-WimPath" option.

    Thank you.

    Fukunaga, Takaaki

    Tuesday, March 15, 2016 4:04 AM
  • Also failing to install package provider too.  

    Running TP4 on Virtual Box (its host is Win7).



    WARNING: Unable to find module repositories.

    I can ping - but we are behind a corp firewall.  wget with -Proxy works fine.

    Thursday, April 7, 2016 6:37 AM
  • Here is a link to the stack overflow article that I just replied to on this Issue.

    Hopefully the same solution will help you

    Saturday, April 30, 2016 10:48 AM
  • I ran into the same issue with TP5 and the following command solved my issue:

    Register-PSRepository -Name "PSGallery" –SourceLocation "" -InstallationPolicy Trusted

    Thanks Stonesbg!



    • Proposed as answer by Markus Kühn Friday, May 26, 2017 3:07 PM
    Monday, May 2, 2016 6:44 AM
  • I can confirm the solution from Ryan has solved the same issue on WinServ 2016 TP5.


    Tuesday, May 31, 2016 12:52 PM
  • In some VMs everything works fine but often it doesn't work at all. I too faced the issue you have reported multiple times. There is an easy workaround though mentioned at

    Monday, October 3, 2016 12:35 PM
  • Seems that the package "ContainerProvider" was renamed.  One should now use:

    Install-PackageProvider ContainerImage

    Wednesday, February 8, 2017 8:23 PM