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 then execute, "Install-Module AzureRM -AllowClobber"
PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).
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 126.96.36.199 -Force" and receive:
You've really done a few things that are not really needed and there are things that you should.
For W2K12+ you only need to install the Azure cmdlets, install the MSOnline sign in assistant and use the MSOnline sign-in assistant to connect to azure and use the Azure cmdlets.
Install and configure Azure PowerShell
PowerShellGet has nothing to do with O365 or Azure specifically. It's just a way to find, save, install and use modules / scripts from the PowerShellGallery. PoSHGet is MS implementation of Nuget (it installs and uses it under the covers), so no reason to separately install it to use Azure cmdlets or any other module in the PowerShellGallery.
Running the cmdlet Get-Module, just list the modules you have already on your system.
To log on to Azure / O365, you just need this...
# Environment setup
Connect-AzureAD -Credential $CredsCloudAdmin
I came across this problem on my computers at work. Even after installing WMF 5.1 the problem persisted. All my research pointed to a bug with the PackageManagement or PowershellGet modules. Unfortunately the only thing that fixed it for me was to find a computer with PowershellGet working and copy over the PackageManagement and PowershellGet modules. If you happen to zip them and put them on the internet somewhere don't forget to run Unblock-File on the zip before you extract everything. Hope this helps.
You must be logged in to reply to this topic.