question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Install-Module errors on install of Azure and AzureRM modules - MacOsX

See original GitHub issue

Steps to reproduce

Run command Install-Module Azure or Install-Module AzureRM

Expected behavior

Install PowerShell module for interacting with Azure using Azure and AzureRM commandlets

Actual behavior

Receive following error code

PackageManagement\Install-Package : Unable to find module providers (PowerShellGet). At /usr/local/microsoft/powershell/6.0.0-alpha.9/Modules/PowerShellGet/PSModule.psm1:1706 char:21

  • … $null = PackageManagement\Install-Package @PSBoundParameters
  •                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidArgument: (Microsoft.Power…InstallPackage:InstallPackage) [Install-Package], Except ion
    • FullyQualifiedErrorId : UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

Environment data

> $PSVersionTable

Name Value


PSVersion 6.0.0-alpha PSEdition Core PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…} BuildVersion 3.0.0.0 GitCommitId v6.0.0-alpha.9 CLRVersion WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

14reactions
StephenGilboycommented, Aug 29, 2016

I followed @alexandair’s advice and it worked. A step by step though is that you’ll need to do the following. (I also put the modules in my home directory, not sure if that is correct)

  1. Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2/ -ProviderName NuGet -ExcludeVersion -Destination $home/powershell/modules
  2. Import-Module $home/powershell/modules/AzureRM.Profile.NetCore.Preview
  3. Import-Module $home/powershell/modules/AzureRM.Resources.NetCore.Preview
  4. Import-Module $home/powershell/modules/AzureRM.NetCore.Preview
  5. Login-AzureRmAccount

Note: When I ran the command Get-Module -ListAvailable AzureRM was not in the list and it seems that when you exit Powershell the AzureRM module goes away. Also, before I started I upgraded dotnet to version 1.0.0-preview3-003246

1reaction
kilasuitcommented, Sep 17, 2016

@dfr0 - you’ll need to raise this in the Azure Powershell repo over at https://github.com/azure/azure-powershell as this isn’t a PowerShell issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Azure module cannot be loaded in Mac OS
1 Answer 1 · In pwsh , run: Uninstall-AzureRm · Then: Install-Module -Name Az -AllowClobber -Scope CurrentUser · If you run Enable-AzureRmAlias , ......
Read more >
Install PowerShell AzureRM module for Azure Stack Hub
Learn how to install PowerShell for Azure Stack Hub. See how to install the PowerShell AzureRM module and required API profiles.
Read more >
Troubleshooting the Azure Az PowerShell module
One of the first steps you should take in troubleshooting a problem with the Azure Az PowerShell module is to enable debug logging....
Read more >
Install PowerShell Az module for Azure Stack Hub
This article explains how to install the Azure PowerShell Az and compatible Azure Stack Hub administrator modules using PowerShellGet. The Az ...
Read more >
Install Azure PowerShell with PowerShellGet
This article explains how to install the Azure PowerShell modules using PowerShellGet. These instructions work on Windows, Linux, and macOS ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found