Trying to Install-Module AzureAD but Get-PSRepository "WARNING: Unable to find module repositories."

%3CLINGO-SUB%20id%3D%22lingo-sub-202819%22%20slang%3D%22en-US%22%3ETrying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repositories.%22%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202819%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20running%20PSVersion%205.1.16299.431%20and%20have%20set%20my%20proxy%20using%20%3CSTRONG%3ENetSH%20WinHTTP%20Set%20Proxy%20proxy-server%3D%22my.proxy.server%22%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20would%20like%20to%20%22Install%20the%20preview%20version%20of%20the%20Azure%20Active%20Directory%20Module%20for%20Windows%20PowerShell%22%20as%20per%20%3CA%20href%3D%22https%3A%2F%2Fsupport.office.com%2Fen-gb%2Farticle%2FManage-who-can-create-Office-365-Groups-4c46c8cb-17d0-44b5-9776-005fced8e618.%26nbsp%3B%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fsupport.office.com%2Fen-gb%2Farticle%2FManage-who-can-create-Office-365-Groups-4c46c8cb-17d0-44b5-9776-005fced8e618.%26nbsp%3B%3C%2FA%3E%20However%2C%20on%20running%20%3CSTRONG%3EInstall-Module%20AzureAD%3C%2FSTRONG%3E%20I%20see%20%22PackageManagement%5CInstall-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'AzureAD'.%20Try%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%20repositories.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20run%20%3CSTRONG%3ERegister-PSRepository%20-Default%3C%2FSTRONG%3E%20without%20issue%20but%20when%20I%20run%20%3CSTRONG%3EGet-PSRepository%3C%2FSTRONG%3E%20I%20am%20faced%20with%20%22WARNING%3A%20Unable%20to%20find%20module%20repositories.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20been%20able%20to%20run%20%3CSTRONG%3Eupdate-help%3C%2FSTRONG%3E%2C%20so%20I%20assume%20I%20can%20get%20online%20ok.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFinally%2C%20I%20tried%20to%20%3CSTRONG%3ERegister-PSRepository%20-Name%20PSGallery%20-SourceLocation%20%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2F%3C%2FA%3E%3C%2FSTRONG%3E%3CBR%20%2F%3E%3CSTRONG%3E-Proxy%20my.proxy.server%3C%2FSTRONG%3E%20but%20see%20the%20message%2C%20%22Get-PSGalleryApiAvailability%20%3A%20PowerShell%20Gallery%20is%20currently%20unavailable.%26nbsp%3B%20Please%20try%20again%20later.%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20someone%20please%20advise%20what%20I%20need%20to%20do%20to%20be%20able%20to%20successfully%20%3CSTRONG%3EInstall-Module%20AzureAD%3C%2FSTRONG%3E%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-202819%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Active%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eproxy%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPSRepository%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-324209%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-324209%22%20slang%3D%22en-US%22%3EAdded%20it%20to%20%24profile%20and%20works%20like%20a%20charm!%20Thanks!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-211679%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-211679%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20all%20for%20your%20help.%26nbsp%3B%20Solution%20found!%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fblogs.technet.microsoft.com%2Fkeithmayer%2F2016%2F01%2F06%2Fquick-tip-using-azure-powershell-with-web-proxy-and-fiddler%2F%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fblogs.technet.microsoft.com%2Fkeithmayer%2F2016%2F01%2F06%2Fquick-tip-using-azure-powershell-with-web-proxy-and-fiddler%2F%3C%2FA%3E%20at%20Step%202%20(Optional)%20%E2%80%93%20Add%20Proxy%20Credentials%20to%20Script%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3ETo%20use%20Windows%20credentials%20for%20proxy%20authentication%2C%20you%20can%20add%20%E2%80%A6%3C%2FEM%3E%3CBR%20%2F%3E%3CSTRONG%3E%5BSystem.Net.WebRequest%5D%3A%3ADefaultWebProxy.Credentials%20%3D%26nbsp%3B%20%5BSystem.Net.CredentialCache%5D%3A%3ADefaultCredentials%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E...and%20when%20I%20added%20that%20in%20a%20new%20PowerShell%20session%2C%20%3CSTRONG%3EGet-PSRepository%20%3C%2FSTRONG%3Eshows%20the%20expected%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20InstallationPolicy%26nbsp%3B%26nbsp%3B%20SourceLocation%3CBR%20%2F%3E----%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20------------------%26nbsp%3B%26nbsp%3B%20--------------%3CBR%20%2F%3EPSGallery%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Untrusted%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fapi%2Fv2%2F%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E...and%20%3CSTRONG%3EInstall-Module%20AzureADPreview%3C%2FSTRONG%3E%20works%2C%20so%20obviously%20a%20proxy%20issue%20all%20along.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-207995%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-207995%22%20slang%3D%22en-US%22%3EHi%20Reinier%2C%3CBR%20%2F%3E%3CBR%20%2F%3EAre%20you%20able%20to%20make%20a%20connection%20through%20Powershell%20with%20Msol%20service.%3CBR%20%2F%3E%3CBR%20%2F%3EYou%20may%20find%20it%20easier%2C%20using%20the%20method%20outline%20in%20the%20following%20article.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice365%2Fenterprise%2Fpowershell%2Fconnect-to-office-365-powershell%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Foffice365%2Fenterprise%2Fpowershell%2Fconnect-to-office-365-powershell%3C%2FA%3E%3CBR%20%2F%3EThe%20same%20method%20can%20be%20used%20to%20connect%20to%20and%20install%20AzureAD%2C%20which%20is%20covered%20in%20the%20article.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-206912%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-206912%22%20slang%3D%22en-US%22%3E%3CP%3EWhoops%20-%20my%20bad%20-%20a%20typo%20in%20my%20suggestion.%3C%2FP%3E%3CP%3EInstead%20of%20Get-Module%20-list%2C%20it%20should%20have%20been%20%3CSTRONG%3EFind-Module%20PowerShellGet%26nbsp%3B%20%7C%20Install-module%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-206906%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-206906%22%20slang%3D%22en-US%22%3E%3CP%3EThank%20you%20for%20the%20tip%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F47048%22%20target%3D%22_blank%22%3E%40Thomas%20Lee%3C%2FA%3E%2C%20when%20I%20run%26nbsp%3B%3CSTRONG%3EGet-Module%20-Name%20PowerShellGet%20-ListAvailable%20%7C%20Install-Module%20%3C%2FSTRONG%3EI%20get%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EPackageManagement%5CInstall-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'PowerShellGet'.%20Try%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%20repositories.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIs%20this%20expected%20given%20that%20the%20get-module%20-ListAvailable%20match%20for%20PowerShellGet%20did%20list%20a%20path%20in%20C%3A%5CProgram%20Files%5CWindowsPowerShell%3F%26nbsp%3B%20Also%2C%20it%20part%20of%20the%20issue%20that%20get-module%20and%20get-psrepository%20don't%20have%20parameters%20to%20set%20a%20proxy%3F%26nbsp%3B%20As%20I%20mentioned%20before%2C%20I%20did%20have%20set%20my%20proxy%20using%20%3CSTRONG%3ENetSH%20WinHTTP%20Set%20Proxy%20proxy-server%3D%22my.proxy.server%22%3C%2FSTRONG%3E.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20running%20out%20of%20options%20running%20with%20this%20network%20configuration%2C%20as%20the%20proxy%20seems%20to%20be%20the%20issue.%26nbsp%3B%20I%20have%20managed%20to%20install%20the%20module%20on%20another%20device%20outside%20the%20network.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-206139%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-206139%22%20slang%3D%22en-US%22%3E%3CP%3EHave%20you%20tried%3A%3C%2FP%3E%3CP%3E%3CSTRONG%3EGet-Module%20-Name%20PowerShellGet%20-ListAvailable%20%7C%20Install-Module%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-203146%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-203146%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F58%22%20target%3D%22_blank%22%3E%40Vasil%20Michev%3C%2FA%3E%2C%20yes%20I%20did%20also%20try%20%3CSTRONG%3EInstall-Module%20AzureAD%20-proxy%20%22my.proxy.server%22%20%3C%2FSTRONG%3Ewith%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EPackageManagement%5CInstall-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'AzureAD'.%20%3C%2FEM%3E%3CEM%3ETry%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%20repositories.%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-203143%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-203143%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F11565%22%20target%3D%22_blank%22%3E%40Ar%C5%ABnas%20Mal%C5%ABkas%3C%2FA%3E%2C%20thank%20you%20for%20the%20suggestion.%26nbsp%3B%20When%20I%20run%20%3CSTRONG%3EGet-Module%20-Name%20PowerShellGet%20-ListAvailable%20%7C%20Select-Object%20-Property%20Name%2CVersion%2CPath%3C%2FSTRONG%3E%20it%20results%20in%20the%20following%20output%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3CEM%3EName%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20Version%20Path%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3E----%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20-------%20----%3C%2FEM%3E%3CBR%20%2F%3E%3CEM%3EPowerShellGet%201.0.0.1%20C%3A%5CProgram%20Files%5CWindowsPowerShell%5CModules%5CPowerShellGet%5C1.0.0.1%5CPowerShellGet.psd1%3C%2FEM%3E%3CBR%20%2F%3E%3CBR%20%2F%3EHowever%2C%20when%20I%20then%20run%20%3CSTRONG%3EInstall-Module%20PowerShellGet%20-Force%3C%2FSTRONG%3E%20I%20get%20the%20output%3A%3C%2FP%3E%3CP%3E%3CBR%20%2F%3E%3CEM%3EPackageManagement%5CInstall-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'PowerShellGet'.%20Try%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%20repositories.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%20when%20I%20run%20%3CSTRONG%3ESave-Module%20-Name%20PowerShellGet%20-Path%20%22c%3A%5Cmydir%22%20%3C%2FSTRONG%3EI%20get%20output%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EPackageManagement%5CSave-Package%20%3A%20No%20match%20was%20found%20for%20the%20specified%20search%20criteria%20and%20module%20name%20'PowerShellGet'.%20Try%20Get-PSRepository%20to%20see%20all%20available%20registered%20module%20repositories.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAny%20other%20way%20to%20%3CSTRONG%3EInstall-Module%20AzureAD%20%3C%2FSTRONG%3Eyou%20can%20suggest%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-202946%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202946%22%20slang%3D%22en-US%22%3E%3CP%3EHave%20you%20tried%20the%20-Proxy%2F-ProxyCredential%20parameters%3F%20%3A)%3C%2Fimg%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-202829%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-202829%22%20slang%3D%22en-US%22%3E%3CP%3EPlease%20try%20to%20install%20the%20latest%20PowershellGet%20module%20as%20described%20here%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FPowerShellGet%2F1.6.5%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellgallery.com%2Fpackages%2FPowerShellGet%2F1.6.5%3C%2FA%3E%26nbsp%3Band%20try%20you%20actions%20again.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20try%20both%20Azure%20Ad%20versions%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3EInstall-Module%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%3E%3CSTRONG%3E%20AzureAD%3C%2FSTRONG%3E%20or%26nbsp%3B%3CSTRONG%3E%3CSPAN%20class%3D%22hljs-pscommand%22%3EInstall-Module%3C%2FSPAN%3E%20AzureADPreview%3C%2FSTRONG%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-532765%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-532765%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F88753%22%20target%3D%22_blank%22%3E%40Reinier%20SPRUIJT%3C%2FA%3EIn%20my%20case%2C%20I%20removed%20%22Automatically%20detect%20setting%20Local%20Area%20Network%20(LAN)%20Settings%22%20and%20Protected%20Mode%20from%20IE%20to%20install%20and%20use%20the%20module.%20I%20was%20on%20a%20server.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1381259%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1381259%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Reinier%2C%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F88753%22%20target%3D%22_blank%22%3E%40Reinier%20SPRUIJT%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20the%20same%20problem%2C%20please%20could%20you%20share%20with%20me%20the%20solution.%3C%2FP%3E%3CP%3Ethank%20youu.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ecordially%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1425432%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1425432%22%20slang%3D%22en-US%22%3E%3CPRE%3E%3CSPAN%20class%3D%22tag%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3ENet.ServicePointManager%3C%2FSPAN%3E%3CSPAN%20class%3D%22tag%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%3A%3ASecurityProtocol%20%3D%20%3C%2FSPAN%3E%3CSPAN%20class%3D%22tag%22%3E%5B%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3ENet.SecurityProtocolType%3C%2FSPAN%3E%3CSPAN%20class%3D%22tag%22%3E%5D%3C%2FSPAN%3E%3CSPAN%20class%3D%22pln%22%3E%3A%3ATls%3C%2FSPAN%3E%3CSPAN%20class%3D%22lit%22%3E12%3C%2FSPAN%3E%20%3C%2FPRE%3E%3CP%3EUsing%20TLS1.2%20connection%20resolved%20the%20problem%20for%20me.%20Try%20executing%20the%20above%20command%20before%20installation.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1467456%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1467456%22%20slang%3D%22en-US%22%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%5BNet.ServicePointManager%5D%3A%3ASecurityProtocol%20%3D%20%5BNet.SecurityProtocolType%5D%3A%3ATls12%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20fixed%20it%20for%20me%20as%20well%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1475048%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1475048%22%20slang%3D%22en-US%22%3E%3CP%3EI%20followed%20%3CA%20title%3D%22PowerShell%20disabled%20support%20for%20TLS%201.0%20for%20the%20Gallery%20-%20Update-Module%20and%20Install-Module%20broken%22%20href%3D%22https%3A%2F%2Fdev.to%2Fdarksmile92%2Fpowershell-disabled-support-for-tls-1-0-for-the-gallery-update-module-and-install-module-broken-1oii%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ethis%20article%3C%2FA%3E%2C%20and%20the%20%22Microsoft%20way%22%20didn't%20work.%20I%20needed%20to%20execute%20the%20second%20block%20of%20commands%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%5BNet.ServicePointManager%5D%3A%3ASecurityProtocol%20%3D%20%5BNet.ServicePointManager%5D%3A%3ASecurityProtocol%20-bor%20%5BNet.SecurityProtocolType%5D%3A%3ATls12%0ARegister-PSRepository%20-Default%20-Verbose%0ASet-PSRepository%20-Name%20%22PSGallery%22%20-InstallationPolicy%20Trusted%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1518261%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1518261%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F88753%22%20target%3D%22_blank%22%3E%40Reinier%20SPRUIJT%3C%2FA%3E%26nbsp%3B%20Thank%20you%20for%20the%20solution.%20It%20helped%20me%20as%20well.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1666315%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1666315%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F682924%22%20target%3D%22_blank%22%3E%40Aravind_Kalaiselvan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%3ESetting%20TLS1.2%20connection%20resolved%20the%20problem%20for%20me.%26nbsp%3B%20Thank%20you%20so%20much.%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1670596%22%20slang%3D%22en-US%22%3ERe%3A%20Trying%20to%20Install-Module%20AzureAD%20but%20Get-PSRepository%20%22WARNING%3A%20Unable%20to%20find%20module%20repos%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1670596%22%20slang%3D%22en-US%22%3EYes%2C%20there%20is%20an%20article%20which%20talk%20about%20this%20issue.%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fwww.powershellcenter.com%2F2020%2F08%2F27%2Fpowershell-fix-warning-unable-to-resolve-package-source-https-www-powershellgallery-com-api-v2%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.powershellcenter.com%2F2020%2F08%2F27%2Fpowershell-fix-warning-unable-to-resolve-package-source-https-www-powershellgallery-com-api-v2%2F%3C%2FA%3E%3CBR%20%2F%3EI%20struggle%20with%20this%20issue%20and%20the%20error%20is%20miss-leading.%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

I am running PSVersion 5.1.16299.431 and have set my proxy using NetSH WinHTTP Set Proxy proxy-server="my.proxy.server"

 

I would like to "Install the preview version of the Azure Active Directory Module for Windows PowerShell" as per https://support.office.com/en-gb/article/Manage-who-can-create-Office-365-Groups-4c46c8cb-17d0-44b5-... However, on running Install-Module AzureAD I see "PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AzureAD'. Try Get-PSRepository to see all available registered module repositories."

 

I can run Register-PSRepository -Default without issue but when I run Get-PSRepository I am faced with "WARNING: Unable to find module repositories."

 

I have been able to run update-help, so I assume I can get online ok.

 

Finally, I tried to Register-PSRepository -Name PSGallery -SourceLocation https://www.powershellgallery.com/api/v2/
-Proxy my.proxy.server but see the message, "Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable.  Please try again later."

 

Can someone please advise what I need to do to be able to successfully Install-Module AzureAD?

18 Replies
Highlighted

Please try to install the latest PowershellGet module as described here https://www.powershellgallery.com/packages/PowerShellGet/1.6.5 and try you actions again.

 

You can try both Azure Ad versions 

Install-Module AzureAD or Install-Module AzureADPreview

Highlighted

Have you tried the -Proxy/-ProxyCredential parameters? :)

Highlighted

@Arūnas Malūkas, thank you for the suggestion.  When I run Get-Module -Name PowerShellGet -ListAvailable | Select-Object -Property Name,Version,Path it results in the following output:

Name          Version Path
----          ------- ----
PowerShellGet 1.0.0.1 C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PowerShellGet.psd1

However, when I then run Install-Module PowerShellGet -Force I get the output:


PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PowerShellGet'. Try Get-PSRepository to see all available registered module repositories.

 

Also, when I run Save-Module -Name PowerShellGet -Path "c:\mydir" I get output:

 

PackageManagement\Save-Package : No match was found for the specified search criteria and module name 'PowerShellGet'. Try Get-PSRepository to see all available registered module repositories.

 

Any other way to Install-Module AzureAD you can suggest?

Highlighted

@Vasil Michev, yes I did also try Install-Module AzureAD -proxy "my.proxy.server" with output:

 

PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'AzureAD'. Try Get-PSRepository to see all available registered module repositories.

Highlighted

Have you tried:

Get-Module -Name PowerShellGet -ListAvailable | Install-Module

Highlighted

Thank you for the tip @Thomas Lee, when I run Get-Module -Name PowerShellGet -ListAvailable | Install-Module I get output:

 

PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'PowerShellGet'. Try Get-PSRepository to see all available registered module repositories.

 

Is this expected given that the get-module -ListAvailable match for PowerShellGet did list a path in C:\Program Files\WindowsPowerShell?  Also, it part of the issue that get-module and get-psrepository don't have parameters to set a proxy?  As I mentioned before, I did have set my proxy using NetSH WinHTTP Set Proxy proxy-server="my.proxy.server".

 

I'm running out of options running with this network configuration, as the proxy seems to be the issue.  I have managed to install the module on another device outside the network.

Highlighted

Whoops - my bad - a typo in my suggestion.

Instead of Get-Module -list, it should have been Find-Module PowerShellGet  | Install-module

Highlighted
Hi Reinier,

Are you able to make a connection through Powershell with Msol service.

You may find it easier, using the method outline in the following article.
https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-office-365-powershell
The same method can be used to connect to and install AzureAD, which is covered in the article.
Highlighted

Thank you all for your help.  Solution found!

 

https://blogs.technet.microsoft.com/keithmayer/2016/01/06/quick-tip-using-azure-powershell-with-web-... at Step 2 (Optional) – Add Proxy Credentials to Script:

 

To use Windows credentials for proxy authentication, you can add …
[System.Net.WebRequest]::DefaultWebProxy.Credentials =  [System.Net.CredentialCache]::DefaultCredentials

 

...and when I added that in a new PowerShell session, Get-PSRepository shows the expected:

 

Name                      InstallationPolicy   SourceLocation
----                      ------------------   --------------
PSGallery                 Untrusted            https://www.powershellgallery.com/api/v2/

 

...and Install-Module AzureADPreview works, so obviously a proxy issue all along.

Highlighted
Added it to $profile and works like a charm! Thanks!
Highlighted

@Reinier SPRUIJTIn my case, I removed "Automatically detect setting Local Area Network (LAN) Settings" and Protected Mode from IE to install and use the module. I was on a server.

Highlighted

Hello Reinier,@Reinier SPRUIJT 

I have the same problem, please could you share with me the solution.

thank youu.

 

cordially 

Highlighted
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 

Using TLS1.2 connection resolved the problem for me. Try executing the above command before installation. 

Highlighted
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

 

This fixed it for me as well

Highlighted

I followed this article, and the "Microsoft way" didn't work. I needed to execute the second block of commands:

 

[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12
Register-PSRepository -Default -Verbose
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted
Highlighted

@Reinier SPRUIJT  Thank you for the solution. It helped me as well.

 

Highlighted

@Aravind_Kalaiselvan 

Setting TLS1.2 connection resolved the problem for me.  Thank you so much.

Highlighted
Yes, there is an article which talk about this issue.
https://www.powershellcenter.com/2020/08/27/powershell-fix-warning-unable-to-resolve-package-source-...
I struggle with this issue and the error is miss-leading.