Variable at dashboard reach all pages?

Hi,
If I put a variable on my Dashboard like $test = “hallo” is that variable reachable from all of my separated pages? My pages are separated PS1 files that I do link to from my Dashboard.

I do see that it works but my Q is are that the right way? Can it cause problems if I only have variabel at my main dashboard page (ps1) file and then call it from my separated pages?

What I can see it’s the same session so it should bee fine but better to ask then discover later that it don’t work.

The variable will be visible at this level to all runspaces in UD. What won’t happen is that if you update the variable, the value will not change for all the places you have used it. It’s effectively read-only.

If you’d like to update the value on different pages, consider using $Cache and $Session scope variables.

1 Like

Ok, So basically if I want to use a static variabel then I can write it on the dashboard (first ps1) page.

yep. Exactly.

1 Like