Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure runbook重命名SQL数据库_Azure_Powershell_Azure Runbook - Fatal编程技术网

Azure runbook重命名SQL数据库

Azure runbook重命名SQL数据库,azure,powershell,azure-runbook,Azure,Powershell,Azure Runbook,在Azure中,我想使用PowerShell automation runbook重命名SQL数据库,命令如下: Set-AzureRmSqlDatabase -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -DatabaseName <DatabaseName> -NewName <NewName> 我期待您从Azure自动化帐户运行runbook 根据您创

在Azure中,我想使用PowerShell automation runbook重命名SQL数据库,命令如下:

Set-AzureRmSqlDatabase -ResourceGroupName <ResourceGroupName> 
   -ServerName <ServerName> -DatabaseName <DatabaseName> -NewName <NewName>

我期待您从Azure自动化帐户运行runbook

根据您创建Azure自动化帐户的时间,您的帐户模块可能已过时

证明这一点的一个简单方法是创建一个新的runbook并将其放入其中:

Get-Command Set-AzureRmSqlDatabase
从门户执行runbook并查看输出。您将惊讶地看到它将向您报告什么模块版本

幸运的是,我有一个非常古老的自动化帐户,可以为您证明这一点:

结果:

更新后

结果是:


您正在管道化参数吗?您也可以从runbook上执行
获取帮助Set-AzureRmSqlDatabase-Full
,查看可用的参数我认为我对这个问题很了解:)
Get-Command Set-AzureRmSqlDatabase