Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Recently, with the new release of Data Gateway Automation, we can now install and configure the gateway using PowerShell itself.
In this blog, we are going to see how to use the new PowerShell scripts to install and configure the data gateway and some best practices.
Note: This feature is still in public preview.
The below is the simple script used to install and configure the data gateway.
$Psversion = (Get-Host).Version
if($Psversion.Major -ge 7)
{
if (!(Get-Module "DataGateway")) {
Install-Module -Name DataGateway
}
$securePassword = "" | ConvertTo-SecureString -AsPlainText -Force;
$ApplicationId ="";
$Tenant = "";
$GatewayName = "MyGateway";
$RecoverKey = "Demo@123" | ConvertTo-SecureString -AsPlainText -Force;
$userIDToAddasAdmin = ""
#Gateway Login
Connect-DataGatewayServiceAccount -ApplicationId $ApplicationId -ClientSecret $securePassword -Tenant $Tenant
#Installing Gateway
Install-DataGateway -AcceptConditions
#Configuring Gateway
$GatewayDetails = Add-DataGatewayCluster -Name $GatewayName -RecoveryKey $RecoverKey
#Add User as Admin
Add-DataGatewayClusterUser -GatewayClusterId $GatewayDetails.GatewayObjectId -PrincipalObjectId $userIDToAddasAdmin -AllowedDataSourceTypes $null -Role Admin
}
else{
exit 1
}
You can also find the above script on GitHub.
You can find the Official PowerShell script here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.