Install-Module -Name AzureRM -AllowClobber
success
PS /root> Install-Module -Name AzureRM -AllowClobber
Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its
InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from
'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): Y
PackageManagement\Install-Package : The member 'TypesToProcess' in the module manifest is not valid: Cannot find path '/tmp/1449695378/Azure.Storage.4.6.1/.\Microsoft.WindowsAzure.Commands.Storage.Types.ps1xml' because it does not exist.. Verify that a valid value is specified for this field in the '/tmp/1449695378/Azure.Storage.4.6.1/Azure.Storage.psd1' file. At /opt/microsoft/powershell/6/Modules/PowerShellGet/PSModule.psm1:9491 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (/tmp/1449695378...re.Storage.psd1:String) [Install-Package], Exception + FullyQualifiedErrorId : Modules_InvalidManifest,Microsoft.PowerShell.Commands.TestModuleManifestCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage PS /root>
PS /root> $PSVersionTable Name Value ---- ----- PSVersion 6.1.0
PSEdition Core
GitCommitId 6.1.0
OS Linux 4.18.13-200.fc28.x86_64 #1 SMP Wed Oct 10 17:29:59 UTC 2018
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Hi @chipitsine
First, the module you're trying download is the Windows version and not for PowerShell Core.
Also, you'll need to install the new version: Az Module. (based in .NETCore). This newer module is fully compatible, it can be installed in both Windows PowerShell and PowerShell Core (Windows & non-Windows). This is due to recent changes moving forward as the AzureRM.Netcore is not longer updated.
Make sure you're installing it with elevated permission.
Also, make sure to read the announcement about this new module at:
https://github.com/Azure/azure-powershell
"... _Run the following command in an elevated PowerShell session to install the new 'Az' module for ResourceManager cmdlets. This module runs on PowerShell 5.1 (with .Net Framework 4.7.2) , or PowerShell Core, and replaces AzureRM. You should not install this module side-by-side with AzureRM:_ ..."
Try it
Install-Module -Name Az -force
Also, try the newer module using Cloud Shell. This is a perfect environment for testing.
:)
Thank you for an explanation. I will try that module.
If I tried to install inappropriate module, why it did not provide me clear reason?
@chipitsine Please move your feedback to PowerShellGet repo.
This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.