Scripts UI not loading Default Repo

Product: PowerShell Universal
Version: 2.6.2

So I ran into a strange issue this morning after reconfiguring my Default Script repo for Universal. The first issue I noticed is that the UI is presenting a completely different Directory than what is in the Default Folder I have specified in the settings. It’s displaying the whole UA Repository folder instead of the Folder I created to house scripts.

Also it seems that using extended folder paths for the scripts no longer works in the scripts.ps1 folder.

i.e., New-PSUScript -Name "Script1.ps1 -Path "\Logging\AuthAuditing\Script1.ps1"

Instead I’m having to use the full folder path in the script declaration.

Providing the whole folder path in scripts.ps1 is the only way I’ve been able to get my scripts to actually show up in the UI and they are only listed under the File List option as the Folder List option provides no scripts at all. With this method they are no longer usable via their name either only the file path.

Anyone else seen this? Did I stumble across a bug or did I do something completely wrong in the process of setting up the new folder?

EDIT:

Forgot to include what I’ve tried.

I tried to hard reset the configuration already using this below method.

Invoke-RestMethod http://myserver/api/v1/configuration -Method POST -Headers @{ Authorization = "Bearer adminAppToken" }

I’ve reset them using VsCode as well.

I’ve restarted the server entire and all IIS services.

Cleared Web Browser Cache data.

No Change from any of these so far nothing seems to be updating the UI or the configuration.

I’m thinking this is definitely a bug. I was able to get my scripts back and all their jobs by just setting the base repo for Script to Automation in the settings.ps1 file and moving all of my scripts to that folder.

Once I do this though if I try to create a subfolder in the Automation directory Universal will create another Directory named Automation and embed the new folder within that Directory.

Essentially Turning the directory into: C:\ProgramData\UniversalAutomation\Repository\Automation\Automation\{New_Folder}

Instead of just creating the folder in the initial Automation directory. I’m going to keep messing around with this to see if I can figure out exactly what it’s doing but I’m thinking if you try to manage the Repo outside of Universal through Windows Explorer it doesnt seem to like that at all.

I’ve opened an issue for this here: Issues with base script directory · Issue #824 · ironmansoftware/issues · GitHub

It definitely sounds buggy.

1 Like

I figured out that it likes when you just use the base Repo and ONE subfolder level below it. But as soon as you begin trying to add sub-folder levels below that the platform seems to no be able to comprehend whats going on. My first place to look would be how the repo is looked at from the settings it almost seems like something might be hard coded.