Missing Azure cmdlets from PowerShell v5



好的,所以我试图用PowerShell控制我的第一个Azure实例。我在Windows 10上,我运行$ psversiontable

Name                           Value
----                           -----
PSVersion                      5.1.14393.693
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14393.693
CLRVersion                     4.0.30319.42000
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

我正在尝试遵循本指南:https://msdn.microsoft.com/en-us/library/mt125356.aspx

所以我键入工作的"安装模块azurerm"

然后我键入" install-azurerm"

我得到:

Install-AzureRM : The term 'Install-AzureRM' 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
+ Install-AzureRM
+ ~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Install-AzureRM:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

我可以使用"登录-AsurerMaccount",并查看我的订阅信息。但是,如果我尝试使用

PS C:WINDOWSsystem32> Remove-AzureADGroup
Remove-AzureADGroup : The term 'Remove-AzureADGroup' 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
+ Remove-AzureADGroup
+ ~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Remove-AzureADGroup:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
PS C:WINDOWSsystem32> Get-MsolGroup
Get-MsolGroup : The term 'Get-MsolGroup' 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-MsolGroup
+ ~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-MsolGroup:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

什么都没有起作用,我遇到的每个指南似乎都超过了两年,指的是v2或以下是Azure PS连接。

我的最终目标是通过cmdlet从广告中删除一个组,而我似乎无法使任何工作都起作用。

i ......感觉到....真的很愚蠢。因此,在发布此信息后,我遇到了另一个Technet链接埋在另一个Technet博客中。

事实证明我不需要上述任何一个(对于我想完成的工作)只需遵循以下操作:https://learn.microsoft.com/en-us/azure/xplat-cli-install#option-2-use-an-installer

然后使用了这些:https://learn.microsoft.com/en-us/azure/virtual-machines/azure-cli-arm-commands#azure-account-manage-manage-your-account-information

引用的文章确实非常非常旧,如果您尝试去那里,您现在将重定向到新页面:https://learn.microsoft.com/en--us/powershell/azure/install-azurerm-ps?view = azurermps-4.1.0。您只需要运行 安装模块azurerm

另外,Azuread模块不是Azurerm的一部分。Azurerm中包含一小部分AD CMDLET,可让您操纵AAD用户,组和应用程序,但它没有Azuread Mdoule的完整AD和MS图支持

最新更新