簡體   English   中英

缺少 PowerShell v5 中的 Azure cmdlet

[英]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

所以我輸入“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 : //docs.microsoft.com/en-us/azure/xplat-cli-install#option-2-使用安裝程序

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

引用的文章真的、真的、真的很舊,如果你嘗試去那里,你現在會被重定向到新頁面: https : //docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps ?view=azurermps-4.1.0 您應該只需要運行 Install-Module AzureRM

此外,AzureAD 模塊不是 AzureRM 的一部分。 AzureRM 中包含一小組 AD cmdlet,允許您操作 AAD 用戶、組和應用程序,但它沒有 AzureAD mdoule 的完整 AD 和 MS Graph 支持

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM