For many of our multi-page dashboards, we have each page in a separate .ps1 file. Then there is a platform variable in PSU for the path to all our dashboard files.
So the code for an actual dashboard may look like:
The variable $UDScriptRoot would point to a path like “D:\repo\PSUCode”
This all worked fine in 2.2.1, but in 2.3.2 I get an error popup at the bottom of the screen (when attempting to load a sub- page). “The term ‘\PsuPage1.ps1’ is not recognized as the name of a cmdlet, function, script file, or executable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.”
It’s as though the variable didn’t exist or wasn’t instantiated in the environment. Removed and re-created the variable but that didn’t fix it.
I just found a workaround: I had the Environment for the dashboard set to “Default”. However, if it change it to anything else (7.1.4, Windows PowerShell 5.1, or Integrated), it works just fine. If I go to Settings → General, I see that no Default Environment is selected.
I would be interested to know why the “Default” environment works in the old version but not the new.
Just wanted to confirm that this behavior is still there in 2.4. Just upgraded and came across this issue. As soon as I changed the option on the dashboard from Default to Integrated all by Variables started working again.
I will attempt to reproduce with steps as soon as I have some time. The Dashboard I had seen the behavior on suddenly turned from a POC to Production today without warning (Funny how that works). So I need to wait for the purchase of a full license to go through to setup a new Dev Environment.