安装后缺少 Azure powershell cmdlet

Missing Azure powershell cmdlet after install

想问一下有没有人遇到过这种问题?虽然我已经安装了 Azure powershell,但我仍然以某种方式收到有关 Get-​Azure​Rm​Sql​Server cmdlet 的错误。这让我感到困惑,因为我能够 运行 其他 cmdlet,例如 Get-AzureRmSqlDatabase

Get-​Azure​Rm​Sql​Server : The term 'Get-​Azure​Rm​Sql​Server' 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.

尝试手动导入模块,但仍然没有任何变化。

Import-Module 'C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\AzureRM.Sql\AzureRM.Sql.psd1'

编辑: 运行宁后Get-Module -ListAvailable -Name Azure -Refresh 结果:

 Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement


ModuleType Version    Name                                ExportedCommands                                                                                                           
---------- -------    ----                                ----------------                                                                                                           
Manifest   3.7.0      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnection, New-AzureAutomationConnection, Remove-AzureAutomationCon...

我的 Azure PowerShell 版本是 3.7.0。
我下载 Azure PowerShell 并手动安装它,它对我有用。
也许您应该先卸载此 PowerShell,然后使用下载文件重新安装它。

PS C:\Users> Get-Module -ListAvailable -Name Azure -Refresh


    Directory: C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Manifest   3.7.0      Azure                               {Get-AzureAutomationCertificate, Get-AzureAutomationConnec...


PS C:\Users\v-jianye> get-azurermsqlserver

cmdlet Get-AzureRmSqlServer at command pipeline position 1
Supply values for the following parameters:
(Type !? for Help.)
ResourceGroupName:

请尝试重新安装