Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Anonymous
Not applicable

Restoration of On-premise gateway using powershell: How to restore datagateway on a new server

Hi,

 

Restoration of datagateway on a new server is working perfectly using the on-premise datagateway software GRAPHICALLY.

 

But we want to restore it in an automated way using powershell cmdlet or any other way, so that after redeployment of a new server we can automate the restoration process as well like registration using add-datagatewaycluster cmdlet.

 

Is there a way to achieve the goal via command line? PLease suggest.

14 REPLIES 14
sanwal05neeraj
New Member

Hi, Did you get any solution for automating recovery of powerbi gateway ?

Sorin15384
New Member

@Anonymous @shubhamdebnathh  Any chance you found a script to recovery/restore PowerBI gateway?

 

we have similar situation. We are hosting gateway on EC2 instance. Occasionally there are changes that causes EC2 instance to rebuild when pipeline runs (for example, new AMI ID). When this happens we have to manually recovery the on premise gateway on the EC2 instance as described here: https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-migrate. We have been able to script majority other things on the server, it's just this restore/recovery of gateway we cannot figure. Would appreciate any insight!

 

We are hosting gateway on EC2 instance. Occasionally there are changes that causes EC2 instance to rebuild when pipeline runs (for example, new AMI ID). When this happens we have to manually recover the on premise gateway on the EC2 instance as described here: https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-migrate. We have been able to script majority other things on the server, it's just this restore/recovery of gateway we cannot figure. Is there a cmdlet that allows recovery or restore gateway? We can pass the recovery key through… just need a way to actually recovery. Would appreciate any insight! Thank you.
lbendlin
Super User
Super User

How are you planning to make the required configuration changes for the proxy settings and the performance tuning?

For datagateway installation & configuration we are using Ansible. lineinfile moudle is adding the proxy details in the respective datagateway configuration files.

Restoration requires you to use the cmdlet with the -OverwriteExistingGateway flag.

Anonymous
Not applicable

With -OverwriteExistingGateway flag it is throwing "Add-dataGatewayCluster: gateway gateway-name already exist" in the new server.

I would call that a bug.

 

You can raise an issue at https://community.fabric.microsoft.com/t5/Issues/idb-p/Issues . If you have a Pro license you can consider raising a Pro ticket at https://admin.powerplatform.microsoft.com/newsupportticket/powerbi

Anonymous
Not applicable

Thanks for the info.

 

By the way isn't the Flag -OverWriteExistingGateway to overwrite the existing gateway configuration in the server where datagateway has already been configured?

 

Can this be used for restoration using recovery key? 

Don't fully understand your question.  Yes, it will overwrite the machine association of the gateway cluster member.  and yes, you need to specify the recovery key as well.  Very much the same process as you would do in the UI.

Anonymous
Not applicable

When I'm using "-OverwriteExistingGateway" on the server where datagateway has already been configured/registered, it is working.

 

But on a complete new server(After terminating that earlier server) or on the same server after reinstalling on-premise datagateway software when using "-OverwriteExistingGateway" it is complaining "gateway already exist".

 

Is -OverwriteExistingGateway suppose to work on new server as well for restoraion?

Explain what you mean by "terminate". Delete the entry in the service?

Anonymous
Not applicable

Terminate=server deletion


We are using AWS EC2 instance.

Deleting the physical server means nothing. You need to take care of the metadata - the configuration definitions held in the service.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.