gpt4 book ai didi

powershell - 找不到 Get-AzureSqlServerUpgrade commandlet

转载 作者:行者123 更新时间:2023-12-03 01:52:50 25 4
gpt4 key购买 nike

找不到

Stop-AzureSqlServerUpgrade
Start-AzureSqlServerUpgrade
Get-AzureSqlServerUpgrade

计划升级到 SQL 数据库 V12 所需的命令。如何安装这些命令。

疑难解答详细信息

PS C:\Windows\system32> Get-Module Azure

ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Manifest 0.9.7 Azure {Add-AzureAccount, Add-AzureApplicati...



PS C:\Windows\system32> $Host.Version

Major Minor Build Revision
----- ----- ----- --------
4 0 -1 -1

Get-AzureSqlDatabase 命令工作正常。

最佳答案

简短回答

您需要切换到新的 AzureResourceManager 模式。

Switch-AzureMode AzureResourceManager
Get-Command Stop-AzureSqlServerUpgrade

更多信息

Azure PowerShell 现在有两种模式:AzureServiceManagementAzureResourceManager。我们使用 Switch-AzureMode 在这些之间进行更改.

某些命令行开关仅在一种模式下可用。 Stop-AzureSqlServerUpgrade commandlet 及其兄弟仅在 AzureResourceManager 模式下可用。

如果您想确定当前模式,可以运行 Get-Module *azure*。输出将如下所示,并包含当前模式的名称

ModuleType   Version   Name                   ExportedCommands
---------- ------- ---- ----------------
Manifest 0.9.7 AzureResourceManager {Add-AlertRule ...}

如果名称只是Azure,则您处于服务管理器模式。

关于powershell - 找不到 Get-AzureSqlServerUpgrade commandlet,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32473707/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com