Author Posts

August 13, 2016 at 11:21 am

Running PowerShell as Administartor

install-module -Name azurerm -force

Below is the error message , any ideas why?

PS C:\WINDOWS\system32> install-module -Name azurerm -force
PackageManagement\Install-Package : Cannot process argument transformation on parameter 'InstalledModuleInfo'. Cannot
convert the "System.Object[]" value of type "System.Object[]" to type "System.Management.Automation.PSModuleInfo".
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\\PSModule.psm1:1661 char:21
+ ... $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidData: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Excep
+ FullyQualifiedErrorId : ParameterArgumentTransformationError,Validate-ModuleAuthenticodeSignature,Microsoft.Powe

PS C:\WINDOWS\system32>

August 13, 2016 at 4:13 pm

Hey there Manimaran,

Are you trying to install the module from a local source? Or from a PSRepository? If you're going from the PowerShell Gallery PSRepository, I would recommend that you install all of the AzureRM modules and not rely on the Import-AzureRm from the AzureRm module. Try this:

(Find-Module *azurerm*).foreach({Install-Module -Name $PSItem.Name})

August 13, 2016 at 5:45 pm

Hey Will, Thanks for the response.
From PSRepository. I ran the above command below is the error message I get

[1661,21: Install-Package] Cannot process argument transformation on parameter 'InstalledModuleInfo'. Cannot convert the "
System.Object[]" value of type "System.Object[]" to type "System.Management.Automation.PSModuleInfo".

August 13, 2016 at 6:33 pm

Finally found the fix

removed the Azure* folders from below locations.

%ProgramFiles%\WindowsPowerShell\Modules folder
%ProgramFiles(x86)%\Microsoft SDKs\Azure\PowerShell


August 13, 2016 at 7:59 pm

Glad you found the solution! Yeah, the AzureRm modules can get funky from time to time. Also, be sure to watch out when you use update-module against the AzureRm modules as they'll sometimes just install the new version sibe-by-side with your older version and that can cause weirdness with the embedded dependencies in the modules.

September 30, 2016 at 2:21 pm

Thanks Mani – I was also getting this (and this page is the only search result for it!). Your fixed worked on one of my 3 machines (there were Azure folders with older contents) but on the other 2 I'm somewhat reluctant to blow the Azure folders away as their contents were updated very recently. But worst case I suppose I could back them up first and then try.


July 2, 2017 at 2:27 pm

Hi Guys, just wanted to say thanks for the posts. This helped me solve why I couldn't install these modules. Particularly Mani with the info about deleting data in the system folders. That is what got me sorted.