Install-Module:术语"Install-Module"未被识别为cmdlet的名称 [英] Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet

查看:1904
本文介绍了Install-Module:术语"Install-Module"未被识别为cmdlet的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在PowerShell中使用Install-Module Azure安装Azure.我收到以下错误:

I was trying to install Azure using Install-Module Azure in PowerShell. I got the following error:

PS C:\Windows\system32> Install-Module Azure
Install-Module : The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, 
or operable program. Check the spelling of the name, or if a path was included, verify that the path is corre
ct and try again.
At line:1 char:1
+ Install-Module Azure
+ ~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Install-Module:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

为什么PS无法识别基本的安装模块?没有这个,我什至无法安装Azure.我该怎么办?

Why is PS not recognizing the basic Install module? Without this I can't even install Azure. What should I do?

推荐答案

由于您使用的是PS的较低版本:

Since you are using the lower version of PS:

在这种情况下,您可以做的是先将模块下载到本地文件夹中.

What you can do in your case is you first download the module in your local folder.

然后,该模块在该文件夹下将存在一个 .psm1 文件.

Then, there will be a .psm1 file under that folder for this module.

您只是

import-Module"file.psm1的路径"

import-Module "Path of the file.psm1"

以下是下载Azure模块的链接: Azure Powershell

Here is the link to download the Azure Module: Azure Powershell

这将完成您的工作.

这篇关于Install-Module:术语"Install-Module"未被识别为cmdlet的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆