想问一下是否有人遇到过这类问题?虽然我已经安装了Azure powershell,但我仍然以某种方式收到有关Get-AzureRmSqlServer
cmdlet的错误。这让我感到困惑,因为我能够运行其他cmdlet,例如Get-AzureRmSqlDatabase
Get-AzureRmSqlServer : The term 'Get-AzureRmSqlServer' 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...
答案 0 :(得分:0)
我的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:
请尝试重新安装。