我正在尝试在 PowerShell 中从我的 Azure 订阅检索资源组名称:
Get-AzureRmResourceGroup | select resourcegroupname
但我收到以下错误:
Get-AzureRmResourceGroup : The term 'Get-AzureRmResourceGroup' 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 correct and try again.
At line:1 char:1
+ Get-AzureRmResourceGroup | select resourcegroupname
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-AzureRmResourceGroup:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我有 PowerShell 5.0 并导入了最新的 Azure 模块。为什么不包括在内?
最佳答案
您需要首先使用以下命令安装 Azure RM 模块:
Install-Module AzureRM
然后需要导入模块来使用:
Import-Module AzureRM
关于powershell - 获取 AzureRmResourceGroup : The term 'Get-AzureRmResourceGroup' is not recognized as the name of a cmdlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41592445/