title: Error trying to install Docker in Windows Server 2016 with Install-Module
body: <p>i'm trying to install Docker in a Windows Server 2016 without success:</p>
  
  <pre><code>PS C:\Windows\system32&gt; Install-Module -Name "DockerMsftProvider" -Force -Verbose
  VERBOSE: Using the provider 'PowerShellGet' for searching packages.
  VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
  VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
  VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is
  'NuGet'.
  VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='DockerMsftProvider'' for
   ''.
  VERBOSE: Total package yield:'1' for the specified package 'DockerMsftProvider'.
  VERBOSE: Performing the operation "Install-Module" on target "Version '1.0.0.1' of module 'DockerMsftProvider'".
  VERBOSE: The installation scope is specified to be 'AllUsers'.
  VERBOSE: The specified module will be installed in 'C:\Program Files\WindowsPowerShell\Modules'.
  VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
  VERBOSE: Downloading module 'DockerMsftProvider' with version '1.0.0.1' from the repository
  'https://www.powershellgallery.com/api/v2/'.
  VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='DockerMsftProvider'' for
   ''.
  VERBOSE: InstallPackage' - name='DockerMsftProvider',
  version='1.0.0.1',destination='C:\Users\x\AppData\Local\Temp\1514242672'
  VERBOSE: DownloadPackage' - name='DockerMsftProvider',
  version='1.0.0.1',destination='C:\Users\x\AppData\Local\Temp\1514242672\DockerMsftProvider\DockerMsftProvider.nup
  kg', uri='https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1'
  VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1'.
  VERBOSE: An error occurred while sending the request.
  VERBOSE: Retry downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1' for '2' more
  times
  VERBOSE: An error occurred while sending the request.
  VERBOSE: Retry downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1' for '1' more
  times
  VERBOSE: An error occurred while sending the request.
  VERBOSE: Retry downloading 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1' for '0' more
  times
  VERBOSE: Downloading package 'DockerMsftProvider' failed, please make sure
  'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1' is accessable.
  WARNING: Source Location 'https://www.powershellgallery.com/api/v2/package/DockerMsftProvider/1.0.0.1' is not valid.
  PackageManagement\Install-Package : Package 'DockerMsftProvider' failed to download.
  At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.1.3.1\PSModule.psm1:1827 char:21
  + ...          $null = PackageManagement\Install-Package @PSBoundParameters
  +                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      + CategoryInfo          : ResourceUnavailable: (C:\Users\943397...tProvider.nupkg:String) [Install-Package], Excep
     tion
      + FullyQualifiedErrorId : PackageFailedInstallOrDownload,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPac
     kage
  </code></pre>
  
  <p>When o try to access the URL by IE it looks like charm, 
  i'm behind corporative proxys and firewalls and didn't any network configurations.</p>
  
  <p>EDIT: using this i resolved the error but get another one</p>
  
  <pre><code>netsh winhttp import proxy source=ie
  $webclient=New-Object System.Net.WebClient
  $creds=Get-Credential
  $webclient.Proxy.Credentials=$creds
  </code></pre>
  
  <p>now i get:</p>
  
  <pre><code>PS C:\Windows\system32&gt; Find-Package –providerName DockerMsftProvider
  WARNING: Cannot find path 'C:\Users\x\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json'
   because it does not exist.
  WARNING: Save-HTTPItem: Bits Transfer failed. Job State: BG_JOB_STATE_ERROR ExitCode = 0
  </code></pre>
  
  <p>Suggestions?</p>
  
  <p>EDIT 2: Guys, Setting the env variables HTTP_PROXY and HTTPS_PROXY works for me
  <a href="https://docs.docker.com/engine/admin/systemd/#httphttps-proxy" rel="nofollow noreferrer">https://docs.docker.com/engine/admin/systemd/#httphttps-proxy</a></p>