Configure on-premises data gateway for live connections
✓Works with OpenClaudeYou are a Power BI infrastructure specialist. The user wants to configure an on-premises data gateway for live connections to on-premises data sources.
What to check first
- Run
Get-Serviceon the gateway machine to verify the "PBIEgwService" Windows service exists and is stopped before installation - Check Windows Event Viewer → Applications and Services Logs → On-premises data gateway to see existing gateway logs
- Confirm your user account has local admin rights on the machine where the gateway will run
- Verify firewall allows outbound HTTPS on port 443 and inbound on the gateway's configured port (default 8050)
Steps
- Download the gateway installer from powerbi.microsoft.com/gateways and run as administrator; the installer creates the PBIEgwService Windows service automatically
- During installation, sign in with your Power BI account (must be a user with Power BI Pro or Premium license) and choose "Register a new gateway on this computer"
- In the gateway configuration screen, set the gateway name (e.g., "Corporate-SQL-Gateway") and recovery email, then click "Configure"
- The gateway automatically registers in your Power BI Service tenant; verify by going to Power BI Service > Admin Portal > Manage Gateways
- In the Admin Portal gateway settings, add data source connections by clicking the gateway name, then "Add data source" and entering: data source name, type (SQL Server, Oracle, etc.), server address, and credentials (stored encrypted locally)
- For live connections, create a new dataset in Power BI Service with "Import" mode or use Direct Query mode, then in the dataset's settings select "Gateway connection" and map each table's data source
- Test the connection by creating a simple report using the dataset; if the refresh fails, check gateway logs at C:\Users[ServiceAccount]\AppData\Local\Microsoft\On-premises data gateway\Logs
- Configure gateway high availability by installing the same gateway version on a second machine with identical data sources, then cluster both gateways under one logical gateway name in the Admin Portal
Code
# PowerShell script to verify and configure gateway prerequisites
# Check if gateway service exists
$gatewayService = Get-Service | Where-Object { $_.Name -eq "PBIEgwService" }
if ($gatewayService) {
Write-Host "Gateway service found: $($gatewayService.Status)"
} else {
Write-Host "Gateway service not installed. Download from powerbi.microsoft.com/gateways"
}
# Verify Windows service is running after installation
Start-Service -Name "PBIEgwService" -ErrorAction SilentlyContinue
Start-Sleep -Seconds 3
$serviceStatus = (Get-Service -Name "PBIEgwService").Status
Write-Host "Gateway Service Status: $serviceStatus"
# Check gateway logs directory
$logPath = "$env:USERPROFILE\AppData\Local\Microsoft\On-premises data gateway\Logs"
if (
Note: this example was truncated in the source. See the GitHub repo for the latest full version.
Common Pitfalls
- Treating this skill as a one-shot solution — most workflows need iteration and verification
- Skipping the verification steps — you don't know it worked until you measure
- Applying this skill without understanding the underlying problem — read the related docs first
When NOT to Use This Skill
- When a simpler manual approach would take less than 10 minutes
- On critical production systems without testing in staging first
- When you don't have permission or authorization to make these changes
How to Verify It Worked
- Run the verification steps documented above
- Compare the output against your expected baseline
- Check logs for any warnings or errors — silent failures are the worst kind
Production Considerations
- Test in staging before deploying to production
- Have a rollback plan — every change should be reversible
- Monitor the affected systems for at least 24 hours after the change
Related Power BI Skills
Other Claude Code skills in the same category — free to download.
Power BI DAX
Write DAX measures, calculated columns, and time intelligence functions
Power BI Data Model
Design star schema data models with relationships and hierarchies
Power BI Report Design
Build interactive reports with visuals, slicers, bookmarks, and drillthrough
Power BI Power Query
Transform data with Power Query M language and advanced editor
Power BI Row-Level Security
Implement RLS with DAX filter expressions and role mapping
Power BI Paginated Reports
Create pixel-perfect paginated reports with Report Builder
Power BI Embedded
Embed Power BI reports in custom applications with REST API
Want a Power BI skill personalized to YOUR project?
This is a generic skill that works for everyone. Our AI can generate one tailored to your exact tech stack, naming conventions, folder structure, and coding patterns — with 3x more detail.