Forum Discussion
How to remove the Power BI gateway using PowerShell or REST API
Why would you want to automate that operation? You don't want to mess with a gateway configuration unless absolutely necessary. Removing a gateway cluster member should be done judiciously (and can be done via the admin center UI too).
Hi lbendlin
This is a buiness requirement. We have one gateway for each customer and we would like to remove it once the customer is offboarded.
Yes, we noticed that the PowerShell cmdlet is able to remove the members
But we would like to remove the gateway itself as well, otherwise we will have heaps of gatway without being used anymore.
- lbendlin3 years agoSuper User
If you must - there is a choreography to it.
1. List all gateways and all cluster members
2. Identify the anchor member
3. for each gateway, remove the members that are NOT the anchor
4. remove the anchor member.
Hint: The gatewayObjectId of the anchor member is the clusterObjectID
Note: This only removes the meta data on the Power BI Service. It does not do anything to your VMs.
- tousinn3 years agoRegular Visitor
Thanks lbendlin
Does this mean we still could only remove the members from the gateway?
I am trying to remove the gateway itself by using PowerShell or REST API using Service Principal.
- lbendlin3 years agoSuper User
When you remove the anchor member the entire gateway registration will be gone and all connections on that gateway too.