On-premises data gateway management via PowerShell (Public Preview)

We are happy to announce the public preview of a new set of PowerShell cmdlets which will enable automation of  gateway management tasks.

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:

get-help <cmdlet-name>

We also plan to make an online version of the documentation available for these cmdlets soon.


Gateway Management:

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:

  • Add-DataGatewayClusterUser
  • Remove-DataGatewayClusterUser

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.