【发布时间】:2017-05-09 02:34:39
【问题描述】:
想问问有没有人遇到过这种问题?尽管我已经安装了 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...
【问题讨论】:
-
能否请您运行此命令来检查您的 azure powershell
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... -
作为一种解决方法,也许我们应该卸载它,然后手动重新安装它,请检查我的答案。
标签: powershell azure module powershell-cmdlet