I am trying to obtain either the AzureRM cmdlets or MSonline cmdlets (don’t know how much they differ) yet I am having difficulty. On a Windows 2012 R2, I upgraded to Windows Management Framework 5.1 and my $psversiontable records PSVersion at 5.1.14409.1005 with CLRVersion 4.0.30319.42000.
Following the steps in https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-5.0.0
I execute the Get-Module PowershellGet and here is what I have,
PowerShellGet 1.0.0.1 C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PowerShellGet.psd1
I then execute, “Install-Module AzureRM -AllowClobber”
and I get the dialogue, “NuGet provider is required to continue” which informs me that I require NuGet provider version 2.8.5.201 or greater. It asks me if I want to import the NuGet provider now and I say ‘YES’. I then get a series of red errors starting off with "Unable to find repository with SourceLocation ‘’. Use Get-PSRepository to see all available repositories.
Fine, continuing along another one of MSFT’s endless rabbit holes, here is what I get when I run Get-PSRepository:
PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:4458 char:31
- … ckageSources = PackageManagement\Get-PackageSource @PSBoundParameters
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : InvalidArgument: (Microsoft.Power…etPackageSource:GetPackageSource) [Get-PackageSource], Exception
- FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageSource
Any help on how I can get these modules loaded in my machine would be much appreciated.
p.s. I tried to manually “Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force” and receive:
Install-PackageProvider : Unable to find repository with SourceLocation ‘’. Use Get-PSRepository to see all available repositories.
At line:1 char:1
- Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
-
+ CategoryInfo : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception + FullyQualifiedErrorId : RegisterPackageSourceRequired,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider