Restart the dashboard from inside the dashboard

Hi everyone!

I’ve been trying to restart my dashboard from withinthe dashboard using the following methods:

  • call my Init.ps1 script from a button on the interface
  • copy the code from my Init.ps1 script in another script to call it from a button
  • Update-UDDashboard

But so far, none of these have worked… Either it crashes or it destroys all my endpoints (error in the internal API: endpoint … not found or something like that; i’ll post the screenshot of the error in the comments)
Do you have any idea what the cause of these errors are or do you have another solution to restart a dashboard ?

Thanks in advance :slight_smile:

Never personally used update-uddashboard, so maybe someone else can offer up advise on that one.
I personally have most of my pages as -endpoint pages, then i dot source my content_pagename.ps1 file into that.
The benefit is that any changes you make to your content_pagename.ps1 will update the next time you refresh/visit that page as it pulls in the dot sourced file.
Outside of that, any more fundamental changes that i need to make, like adding a new page, changing auth policies etc, I have a function which recycles my app pool in IIS (it also checks for active sessions so i can see if anyone is currently using the dashboard).
Let me know if you want more details on either process.

Also if you’re feeling brave and want to move from 2.9.0 (or below), universal has a very good way of refreshing the dashboards on the fly whenever you make a change to any of the files in your dashboard folder, there’s just a little bit of work migrating to 2.9.1 or a bit more work migrating to v3

all the tests are using update-uddashboard so you can take a look at them

1 Like