Alrighty所以我试图用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中删除一个组,我似乎无法使其中任何一个工作。
答案 0 :(得分:1)
我......感觉......真的很傻。 所以在我发布这个之后,我遇到了另一个埋在另一个technet博客中的technet链接。
原来我不需要上述任何内容(因为我想要完成的任务) 简单地遵循这个: https://docs.microsoft.com/en-us/azure/xplat-cli-install#option-2-use-an-installer
答案 1 :(得分:0)
引用的文章真的非常非常老,如果您尝试去那里,现在可以重定向到新页面:https://docs.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 Graph支持