These PowerShell scripts help manage
- On-premises data gateways
- Power BI Data sources
Note: These cmdlets require PowerShell core 6.2.2 or higher
The cmdlets are available on PowerShell Gallery and can be installed in an elevated PowerShell session:
Install-Module -Name DataGateway
The entre list of cmdlets can be found using the following cmd
Get-Command -Module DataGateway*
Examples and descriptions are included in the cmdlets and you can access them using:
Following are PowerShell cmdlets which can be used for administering gateway clusters and members:
- Get-DataGatewayCluster: Lists all gateway clusters for the current user or a specific one based on the passed parameters
- Get-DataGatewayClusterStatus: Returns the cluster status along with additional properties
- Get-DataGatewayInstaller: Lists users authorized to install and register gateways within the tenant
- Get-DataGatewayTenantPolicy: Returns the gateway installation and registration policy for the tenant.
- Add-DataGatewayClusterUser: Add a specific user to a gateway cluster for specific permissions
- Set-DataGatewayCluster: Set properties of an existing gateway cluster
- Set-DataGatewayInstaller: Modify list of users who can install and register new gateways on the tenant
- Set-DataGatewayTenantPolicy: Set the gateway installation and registration policy for the tenant
- Remove-DataGatewayCluster: Remove a gateway cluster
- Remove-DataGatewayClusterMember: Remove a gateway member from the corresponding gateway cluster
- Remove-DataGatewayClusterUser: Remove a user from a gateway cluster
In addition, wherever applicable, these cmdlets can be run under a tenant level scope. This would of course require the user to be a global Office 365 admin or a Power BI service admin. For instance, the following cmdlet would return all gateways within your tenant.
Get-DataGatewayCluster -Scope Organization
Similarly, running the same command without the scope parameter or with the “Individual” scope would return the list of gateways, you are administrator of.
Get-DataGatewayCluster -Scope Individual
Another new cmdlet, which allows tenant admins to restrict installation of on-premises data gateway ins standard mode is as follows. The tenant admin can then allow specific users to install using the Set-DataGatewayInstaller cmdlet.
Set-DataGatewayTenantPolicy -ResourceGatewayInstallPolicy Restricted
Only the following cmdlets support the scope of Organization:
Data source (Power BI) management:
Following are PowerShell cmdlets which can be used for managing Power BI data sources:
- Add-DataGatewayClusterDatasourceUser: Add a user with required permissions for a Power BI data source
- Get-DataGatewayClusterDatasource: Lists all Power BI data sources on a gateway cluster or a specific one based on the passed parameters
- Get-DataGatewayClusterDatasourceStatus: Returns the connectivity status of a data source in a gateway cluster
- Get-DataGatewayClusterDatasourceUser: Lists users who have access to the specific Power BI data source in a gateway cluster
- Remove-DataGatewayClusterDatasource: Removes a Power BI data source from a gateway cluster
- Remove-DataGatewayClusterDatasourceUser: Removes a user from a Power BI data source
- Set-DataGatewayClusterDatasource: Set properties of an existing Power BI data source
We will be enriching these cmdlets with additional management operations in the upcoming releases.
Note: You have the option of using Azure Data Studio with the PowerShell extension to work with these cmdlets:
Please continue to send us feedback for what new capabilities you’d like to see in the future.