gpt4 book ai didi

powershell - PowerShell v5 中缺少 Azure cmdlet

转载 作者:行者123 更新时间:2023-12-02 23:57:02 25 4
gpt4 key购买 nike

好吧,我正在尝试使用 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

所以我输入“Install-Module 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

我可以使用“Login-AzureRmAccount”并查看我的订阅信息。但如果我尝试使用

PS C:\WINDOWS\system32> 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:\WINDOWS\system32> 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

什么都不起作用,我遇到的每一个指南似乎都过时了两年,并且提到了 Azure PS 连接的 V2 或更低版本。

我的最终目标是通过 cmdlet 从 AD 中删除一个组,但我似乎无法让这一切发挥作用。

最佳答案

我……感觉……真的很傻。因此,在我发布此内容后,我发现了另一个隐藏在另一个 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-your-account-information

关于powershell - PowerShell v5 中缺少 Azure cmdlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42676596/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com