1

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 enter image description here

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?

2 Answers 2

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

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.

6 Comments

As I said in my description I have Windows 10 so I already have the latest version of PowerShellGet. My PSVersion is 5.1.14393.953.
@mob1lejunkie please try to register PSGallery with this command Register-PSRepository -Default Then try Get-PSRepository
@mob1lejunkie Get-PSRepository still WARNING: Unable to find module repositories?
Yes still the same warning.
@mob1lejunkie please try get-module -Name Packagemanagement and get-packagesource. is there something list in powershell?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.