Proper way of saving variables between dashboard pages?

The main page of my dashboard has a table with a row for each SQL server I am monitoring. Each row has a button and on-click action a full-screen modal will populate and show details for that specific server by using $EventData. However, I am trying to figure out what the proper way is to pass a selected value to a new page that already exists. Yes, I could build a dynamic URL, but that would mean building a replica dashboard page for each of my servers. Ideally, all links would lead to the same “drill-down” page, but a filter of server name (the selected value) would be applied and all visuals would show only that particular server.

Is it pages on the same Dashboard?

Then $Session:VariableName = “value” or $Cache:VariableName = “value” could do it.

Custom Variable Scopes - PowerShell Universal

Works like a charm; exactly what I needed. Thanks!

1 Like