通过 Powershell 创建 Azure SQL 分析

Create Azure SQL Analytics via Powershell

我想知道是否有特定的 Powershell 命令可以创建 Azure SQL Analytics resource. So far I've only found how to enable sending diagnostics logs to a Log Analytics workspace

我假设我可以尝试 arm 模板,但如果有专门的命令来避免创建另一个 json 模板就更好了。

您可以使用以下 powershell:

Set-AzOperationalInsightsIntelligencePack -ResourceGroupName rgName -WorkspaceName workspaceName -IntelligencePackName AzureSQLAnalytics -Enabled $true

阅读:https://docs.microsoft.com/en-us/azure/azure-monitor/platform/powershell-workspace-configuration#create-and-configure-a-log-analytics-workspace