Reputation: 1678
I have already created Azure Data Factory
Integration Runtime
in Azure Portal and now want to create via PowerShell script
$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"
}
when i run script it does not display message from else block. can anyone help
Upvotes: 1
Views: 562
Reputation: 5294
I tried the same code ,it worked for me .still if you want to cross verify , you can do that by calling below function.
Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName rg-test-dfv2 -DataFactoryName test-df-eu2 -Name test-dedicated-ir
It will give you following result which you can verify later
Location : West US
NodeSize : Standard_D1_v2
NodeCount : 1
MaxParallelExecutionsPerNode : 1
CatalogServerEndpoint : test.database.windows.net
CatalogAdminUserName : test
CatalogAdminPassword : **********
CatalogPricingTier : S1
VNetId :
Subnet :
State : Starting
ResourceGroupName : rg-test-dfv2
DataFactoryName : test-df-eu2
Name : test-dedicated-ir
Description : Reserved IR
Hope it helps.
Upvotes: 1