# PowershellGet - Find-Module

**URL:** <https://forums.powershell.org/t/powershellget-find-module/2808>\
**Category:** PowerShell Help\
**Created:** [July 10, 2014, 6:23am UTC](https://forums.powershell.org/t/powershellget-find-module/2808 "2014-07-10T06:23:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![marty](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@marty](https://forums.powershell.org/u/marty)\
**Post date:** [July 10, 2014, 6:23am UTC](https://forums.powershell.org/t/powershellget-find-module/2808/1 "2014-07-10T06:23:35Z")

</div>

On Windows 8.1, Find-Module doesn’t pull modules from the Powershell Module gallery. I was manually able to download and install NuGet in the correct folder, but now I am stuck again. Does find-module work behind a proxy?

Exception calling “FindPackage” with “2” argument(s): “An error occurred while loading packages from  
‘[https://go.microsoft.com/fwlink/?LinkID=397631&amp;clcid=0x409](https://go.microsoft.com/fwlink/?LinkID=397631&amp;clcid=0x409)’: Expected an absolute, well formed http URL without a  
query or fragment.  
Parameter name: serviceRoot”  
At C:\windows\system32\windowspowershell\v1.0\Modules\PowerShellGet\SourceTypes\PSGallery\PSGallery.psm1:157 char:9

- 

```
    $packageInfo = [NuGet.PackageRepositoryExtensions]::FindPacka ...

```

- 

```
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

```

  - CategoryInfo : NotSpecified: (🙂 , MethodInvocationException
  - FullyQualifiedErrorId : InvalidOperationException

---

<div class="post-metadata">

**Author:** ![donj](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/donj/32/137_2.png) [@donj](https://forums.powershell.org/u/donj)\
**Post date:** [July 10, 2014, 6:59am UTC](https://forums.powershell.org/t/powershellget-find-module/2808/2 "2014-07-10T06:59:49Z")

</div>

As the error indicates, you’re not allowed to use a URL that has a ?query in it. This might be something better logged as a bug on Connect.

---

<div class="post-metadata">

**Author:** ![marty](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@marty](https://forums.powershell.org/u/marty)\
**Post date:** [July 10, 2014, 8:47am UTC](https://forums.powershell.org/t/powershellget-find-module/2808/3 "2014-07-10T08:47:21Z")

</div>

Thanks for the response.

It is the proxy server at work.

Attach laptop to LAN cable and configure required proxy in IE. Fails

Remove LAN cable and connect to internal wireless which has no proxy. Remove proxy settings in IE. Succeeds.

The reason this is an issue is my main workstation is a Citrix session accessed via a Wyse unit. No wireless. Only wired connection.

Thanks,  
Marty

---

<div class="post-metadata">

**Author:** ![ambrosis](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@ambrosis](https://forums.powershell.org/u/ambrosis)\
**Post date:** [August 28, 2014, 9:39am UTC](https://forums.powershell.org/t/powershellget-find-module/2808/4 "2014-08-28T09:39:30Z")

</div>

Here’s a trick that may work (it just worked for me!), I previously figured/googled this out when Update-Help didn’t work from behind the work proxy.

```
$wc = New-Object System.Net.WebClient
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
```

Then you just run your Install-Module command. Ta-dah

---

<div class="post-metadata">

**Author:** ![thorsten-ess](https://avatars.discourse-cdn.com/v4/letter/t/f4b2a3/32.png) [@thorsten-ess](https://forums.powershell.org/u/thorsten-ess)\
**Post date:** [September 3, 2015, 6:23pm UTC](https://forums.powershell.org/t/powershellget-find-module/2808/5 "2015-09-03T18:23:19Z")

</div>

Hello everybody,

I know this is an old thread but I haven’t found any solution to working behind a proxy, so I hope somebody can help. The solution that ambrosis posted doesn’t work for me, because i have to use different credentials for the proxy login. That’s not really a problem as i can just put other credentials in like this:

```
$webclient = New-Object System.Net.WebClient
$creds = Get-Credential
$webclient.Proxy.Credentials = $creds
```

This works totally fine for Update-Help, but i just can’t connect through the proxy with Find-Module:

```
PS C:\Windows\system32> Find-Module -Verbose
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'.
WARNING: Repository location 'https://www.powershellgallery.com/api/v2/' is not valid for this provider.
WARNING: Unable to resolve module repository 'https://www.powershellgallery.com/api/v2/'.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'http://chocolatey.org/api/v2/' and PackageManagementProvider is 'NuGet'.
```

Does anybody have an idea how to get the proxy to work?

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:44pm UTC](https://forums.powershell.org/t/powershellget-find-module/2808/6 "2024-05-16T20:44:48Z")

</div>

Closed on May 16, 2024, 8:44pm UTC


