Find-Module doesn't work in ISE (or ISE Preview)
This should speak for itself:
PS > Get-PackageSource
Name ProviderName IsTrusted IsRegistered IsValidated Location
PSGallery PowerShellGet False True False https://www.powershellgallery.com/api/v2
PS > find-module ise -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: No module found matching 'ise' .
Find-Module works fine in the console host.
Spying with Wireshark reveals that while the console host connects to https://www.powershellgallery.com as part of the execution of Find-Module, this is not the case for the ISEs...

Closing, but if you do find out what the issue is, feel free to reactivate this.
2 comments
-
Stéphane BARIZIEN commented
I've tested on a colleague's machine with non-preview ISE on Windows 10.0.10586.494
Find-Module *ise* -verbose works, after prompting to install the NuGet package provider:
VERBOSE: Installing NuGet provider.
VERBOSE: Using the provider 'Bootstrap' for searching packages.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: Finding the package 'Bootstrap::FindPackage' 'NuGet','','2.8.5.201','''.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registere
d repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: Finding the package 'Bootstrap::FindPackage' 'NuGet','','0.0.0.1','''.
VERBOSE: Installing the package 'https://oneget.org/nuget-2.8.5.205.package.swidtag'.
VERBOSE: Installed the package 'nuget' to 'C:\Users\eman\AppData\Local\PackageManagement\ProviderA
ssemblies\nuget\2.8.5.205\Microsoft.PackageManagement.NuGetProvider.dll'.
VERBOSE: Skipping previously processed assembly: C:\Program Files\WindowsPowerShell\Modules\Packag
eManagement\1.0.0.1\Microsoft.PackageManagement.MetaProvider.PowerShell.dll.
VERBOSE: Skipping previously processed assembly: C:\Program Files\WindowsPowerShell\Modules\Packag
eManagement\1.0.0.1\Microsoft.PackageManagement.CoreProviders.dll.
VERBOSE: Skipping previously processed assembly: C:\Program Files\WindowsPowerShell\Modules\Packag
eManagement\1.0.0.1\Microsoft.PackageManagement.MsuProvider.dll.
VERBOSE: Skipping previously processed assembly: C:\Program Files\WindowsPowerShell\Modules\Packag
eManagement\1.0.0.1\Microsoft.PackageManagement.ArchiverProviders.dll.
VERBOSE: Skipping previously processed assembly: C:\Program Files\WindowsPowerShell\Modules\Packag
eManagement\1.0.0.1\Microsoft.PackageManagement.MsiProvider.dll.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/'; and PackageManageme
ntProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='NuG
et'' for ''.
VERBOSE: Total package yield:'0' for the specified package 'NuGet'.
VERBOSE: Installing the package 'https://oneget.org/nuget-2.8.5.205.package.swidtag'.
VERBOSE: Installed the package 'nuget' to 'C:\Users\eman\AppData\Local\PackageManagement\ProviderA
ssemblies\nuget\2.8.5.205\Microsoft.PackageManagement.NuGetProvider.dll'.
VERBOSE: The provider 'NuGet' has already been imported. Trying to import it again.
VERBOSE: Loading an assembly 'C:\Users\eman\AppData\Local\PackageManagement\ProviderAssemblies\nug
et\2.8.5.205\Microsoft.PackageManagement.NuGetProvider.dll'.
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registere
d repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/'; and PackageManageme
ntProvider is 'NuGet'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='*is
e*'' for ''.
VERBOSE: Total package yield:'0' for the specified package '*ise*'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/'; for '*ise*'.Version Name Type Repository Description
------- ---- ---- ---------- -----------
2.5.2.0 ISESteroids Module PSGallery Extension for P...
5.1.1 PowerShellISE-preview Module PSGallery A preview relea...
[...]
VERBOSE: Total package yield:'18' for the specified package '*ise*'.
1.0.0.1 PSISEToggleOutliningAddon Module PSGallery PowerShell Modu...
1.9.0 AutomatiserarSE Module PSGallery This is an open...So there must be something misconfigured on *my* system...
(if you want to close the issue here on UV, that's fine by me)
-
Stéphane BARIZIEN commented
Sure! Here's what you asked for (run from ISEP 5.1.1):
PS > $PSVersionTable
Name Value
---- -----
PSVersion 5.0.10586.494
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.10586.494
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1PS > get-packageprovider nuget, powershellget
WARNING: Unable to download the list of available providers. Check your internet connection.
Name Version DynamicOptions
---- ------- --------------
NuGet 2.8.5.202 Destination, ExcludeVersion, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet 1.0.0.1 PackageManagementProvider, Type, Scope, InstallUpdate, PackageManagementProvider, Type, Filter, Tag, Includes, DscResource, Command, PackageMa...Note: I also cannot repro on all systems, for instance at home; will ask some colleagues to attempt a repro to check whether this could be infrastructure/proxy related