【发布时间】:2019-09-07 17:40:09
【问题描述】:
我已经在 Azure 门户中创建了Azure Data FactoryIntegration Runtime,现在想通过 PowerShell 脚本创建
$IR = Get-AzDataFactoryV2IntegrationRuntime -DataFactoryName "CappDashboardDataFactory" -ResourceGroupName "ADFResourceGroup" -Name "CappDashboardDataFactory-Selfhosted-IR"
if(-not $IR)
{
Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName "ADFResourceGroup" -DataFactoryName "CappDashboardDataFactory" -Name "CappDashboardDataFactory-Selfhosted-IR" -Type SelfHosted -Description "selfhosted IR description"
# created successfully
Write-Output "Created Successfully"
}
else
{
# already exists
Write-Output "Already Exists"
}
【问题讨论】:
-
你的脚本没有错误,我在我身边测试过,对于 else 块工作正常。你这边有 if 块的输出吗?
标签: azure powershell azure-data-factory azure-powershell