How can I rename an on prem data gateway?
I have found questions and answers about this, but none of them appear to be correct. Let me explain:
The gateway cluster can be renamed via the Power Platform Admin Center. The gateway cannot.
Installing a gateway on a new computer and "taking over" another gateway does not change its name.
The DataGateway
module in PowerShell doesn't appear to provide a way to set the properties of a gateway cluster member. (No Set-DataGatewayClusterMember
command.)
Alternately, How can I change which gateway is primary in the gateway cluster?
Again, I have found lots of incomplete or wrong information online.
- Installing a gateway on a new computer and "taking over" another gateway uses the same name as the old gateway.
- Uninstalling the gateway from the computer hosting the primary gateway makes it "Offline".
- Uninstalling the gateway from the computer hosting the primary gateway, then trying to remove the gateway results in an error message.
Please remove all other member gateways before removing the primary instance of this gateway cluster.
- Uninstalling the gateway from the computer hosting the primary gateway, disabling the gateway, then trying to remove the gateway results in an error message.
Please remove all other member gateways before removing the primary instance of this gateway cluster.
Again, looking at the DataGateway
module in PowerShell, Set-DataGatewayCluster
doesn't appear to provide a way to define which instance is primary (maybe a -PrimaryInstance
or -PrimaryMember
parameter?)
Then I thought...
What if I remove all cluster members? Does the cluster still exist? Can I then create a new gateway, add it to the cluster, and give it the correct name and expect that to become the primary member?
So I created a new gateway without adding it to a cluster. A new cluster was created. I added a new data source to it. Then I uninstalled the gateway from the machine and removed it (the primary member) from the cluster via Power Platform Admin Center. The cluster was immediately destroyed. I reinstalled the gateway to try to connect it to the new cluster. Sure enough... it's not there.
So, removing the primary gateway destroys the gateway cluster and all related data sources. That wouldn't really be part of my preferred solution.
Other options
Maybe I can find and change the gateway name in the the Windows Registry of the computer where I installed the gateway. Nope.
Maybe:
- make note of all settings for all data sources
- remove all gateways
- install the new gateway with the correct name
- reconfigure all of the data sources
Or I can avoid some downtime if I...
- Create a new gateway (with the right name) and cluster.
- Copy all of my data source config from the old cluster to the new cluster.
- Check the settings for every data set in Power BI and and, if the data set uses a gateway, change which gateway it uses.
Maybe some of that could be done by a PowerShell script. But I don't see that Set-DataGatewayClusterDatasource
provides any way for me to set the login credentials.
Either way, I need to spend a bunch of time completely reconfiguring how Power BI connects to all of my data sources because Microsoft won't let me update one small, arbitrary piece of text? That can't be right.
So... What is the correct way to rename a Power BI On Prem Data Gateway?