Hey everyone! I'm looking for some help with a PowerShell script that can restart the Edge browser and also restore any previously opened windows and tabs. The catch is that my workplace has disabled the auto-restore feature in Edge. So, I'm wondering if there's a way to get around this limitation and achieve tab restoration. Any tips or guidance would be greatly appreciated! Thanks!
2 Answers
It's technically feasible to restart Edge and try to restore tabs, but it’s going to be tricky. You might need to utilize APIs to list all open Edge windows and their respective tabs, save that info somewhere, then close them all down. When you restart Edge, you would need to go through your saved data to reopen everything. However, this approach is prone to issues and could risk losing data, since it's not how the app is designed to operate. Just a heads up!
If you're just looking to quickly get your tabs back after closing Edge, you can hit Ctrl + Shift + T to reopen the last tab you closed, or you can kill the Edge process which prompts a restore option! This won’t work in every scenario but is a quick fix to get back what you lost!
Or you could just use taskkill to close Edge. When you relaunch, it'll give you that option to restore all windows!