Reputation: 945
I'm unable to install AzureADPreview on my machine. When I run 'Install-Module -Name AzureADPreview' I get the error message:
No match was found for the specified search criteria and module name 'AzureADPreview'
If I run 'Get-PSRepository' I get
WARNING: Unable to find module repositories.
I have spent few hours trying to resolve this issue but to no avail. My first thought was maybe there was no provider setup but running 'Get-PackageProvider -ListAvailable' shows
I thought maybe Nuget wasn't installed properly so I re-installed it using 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Verbose -Force' same problem. Interesting thing is I can find package using Chocolatey but AzureADPreview is not hosted there.
My machine is running Windows 10 with .Net Framework 4.6.2 installed.
Am I missing something really obvious?
Upvotes: 1
Views: 8566
Reputation: 41
The had exactly the same problem on windows 10. I am behind a corp proxy.
Step 1: [System.Net.WebRequest]::DefaultWebProxy.Credentials = [System.Net.CredentialCache]::DefaultCredentials
Step 2: Register-PSRepository -Default
Step 3: Get-PSRepository
Hope this works for you too. It all started for me when I was trying to execute
Install-Module AzureADPreview
Upvotes: 1
Reputation: 13954
According to your description, to install items from the Gallery requires the latest version of the PowerShellGet module, which is available in Windows 10, in Windows Management Framework (WMF) 5.0, or in the MSI-based installer (for PowerShell 3 and 4).
We can use PowerShell to view the version of WMF:
PS C:\windows> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14393.693
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.693
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Get WMF 5.0 or later, the PSVersion is the WMF version, my WMF version is 5.1.
Here is the requires of the AzureadPreview, please refer to it.
Upvotes: 0