【问题标题】:SQL Azure powershell commands not recognized anymore. Deprecated?SQL Azure powershell 命令不再被识别。已弃用?
【发布时间】:2018-10-23 07:24:59
【问题描述】:

已经在Get-AzureSqlDatabaseServer : The term 'Get-AzureSqlDatabaseServer' is not recognized as the name of a cmdlet讨论过

我只需要确定这种行为是否是由于整个 Azure 服务管理已弃用?被 AzureRM 取代还是别的什么?

【问题讨论】:

    标签: powershell azure-sql-database azure-rm


    【解决方案1】:

    如果 cmdlet 不以 <verb>-AzureRm* 开头,则它不是 AzureRm 模块的一部分。

    Get-AzureSqlDatabaseServer 似乎是 Azure 模块的一部分,该模块已被弃用。

    也许您正在寻找Get-AzureRmSqlServer

    Get-Help Get-AzureRmSqlServer

    NAME
    Get-AzureRmSqlServer
    
    SYNOPSIS
    Returns information about SQL Database servers.
    
    
    SYNTAX
    Get-AzureRmSqlServer [[-ResourceGroupName] <System.String>] [[-ServerName] 
    <System.String>] [-DefaultProfile <Microsoft.Azure.Commands.Common.Authenticatio
    n.Abstractions.IAzureContextContainer>] [-Confirm 
    <System.Management.Automation.SwitchParameter>] [-WhatIf 
    <System.Management.Automation.SwitchParameter>] [<CommonParameters>]
    
    
    DESCRIPTION
    The Get-AzureRmSqlServer cmdlet returns information about one or more Azure SQL 
    Database servers. Specify the name of a server to see information for only that 
    server.
    

    【讨论】:

    • 是的,我知道它不是 AzureRM 的一部分。 AzureRM 可能是一个不同的、新的堆栈,更好、更强大。让我问这个问题的原因是在 powershell 和脚本方面的知识和经验非常有限。不幸的是,我的试卷 (70-765) 中充满了前面提到的(非 AzureRm)cmdlet。只是想确定一下,以便我自己可以用 AzureRm 替换所有 -AzureSqlDatabase 语法命令 :-) 谢谢 gvee
    • 如您在提供的示例 cmdlet 中所见;您不能在每种情况下都简单地将Azure 替换为AzureRm ......但它们通常非常接近!您始终可以使用 Get-Command -Module AzureRm* 在模块中搜索 cmdlet
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-10-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-23
    • 2021-05-18
    • 2015-05-09
    相关资源
    最近更新 更多