Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet – AzureRM, MSOnline

Jeżeli chcemy zainstalować moduł PowerShell do zarządzania np. Azure (AzureRM) na Windows 7, Windows 8, Windows 2008 R2, Windows 2012, Windows 2012R2 i w tym celu wydamy komendę:

Install-Module AzureRM

Zobaczymy błąd:

Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet, funce program. Check the spelling of the name, or if a path was included, verify that the path
At line:1 char:1
+ Install-Module AzureRM
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundE + FullyQualifiedErrorId : CommandNotFoundException

 

Aby rozwiązać ten problem do niedawna trzeba było korzystać z Web Platform Installer. Jedną z trochę zapomnianych jest zainstalowanie PackageManagement PowerShell Modules. Po instalacji pakietu mamy dostęp do komendy ‘Install-Module’ i możemy zainstalować nie tylko AzureRM, jak również np. moduł MSOnline:

Install-Module MSOnline

 


 

If you want to install the PowerShell module for managing eg. Azure (AzureRM) on Windows 7, Windows 8, Windows 2008 R2, Windows 2012, Windows 2012R2 and for this purpose we will issue the command:

Install-Module AzureRM

We will see:

Install-Module : The term ‘Install-Module’ is not recognized as the name of a cmdlet, funce program. Check the spelling of the name, or if a path was included, verify that the path
At line:1 char:1
+ Install-Module AzureRM
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Install-Module:String) [], CommandNotFoundE + FullyQualifiedErrorId : CommandNotFoundException

 

To solve this problem we usually had to use the Web Platform Installer. But there is another option – just install PackageManagement PowerShell Modules. After installing the package we have access to the ‘Install-Module’ command and we can install not only AzureRM, but also for example the MSOnline module:

Install-Module MSOnline