I have a server where I did install the Powershell Universal application, and another PC I have installed Powershell Universal for VScode. In VScode I set the IP adres, also VScode is seeing the test script I created.
But when I want to open it, I get the message below:
Error running command powershell-universal.editScript: cannot open file:///c%3A/ProgramData/UniversalAutomation/Repository/test.ps1. Detail: Unable to read file ‘c:\ProgramData\UniversalAutomation\Repository\test.ps1’ (Error: Unable to resolve non-existing file ‘c:\ProgramData\UniversalAutomation\Repository\test.ps1’). This is likely caused by the extension that contributes powershell-universal.editScript.
Of course it’s on a different machine, so what to do? I read the manual, this was talking about Github, I have a paid account. But do I need to pay 2 licenses of Universal Dashboard, one on the development machine and one on the production server? I can’t believe it, so can anyone tell me what I do wrong or what I didn’t read?
The VS Code extension currently does not work to remotely edit files. It’s attempting to edit the files locally. We built into the v1.5 server the ability to enable this support and now we need to update the extension to take advantage of that. Hopefully in the next couple of weeks.
I was actually able to do this successfully using VSCode remoting with SSH. Worked pretty well. You need winssh on the remote server and the local computer. Once you open VSCode in remote session mode it sets up the remote VSCode server with all of your extensions. Then you can enter the file path for the remote repository in the Powershell Universal extension settings and edit the PU files just like they are on your local machine. Debugging works too.
I did use a filesystem folder linked, to a network drive for some time and it was working ok. I was all the time using VScode on as a Remote App on one of my Remote Desktop Servers.
Now I tried to use my local VScode and use the API and local Powershell, but I don’t want to install PSU on my local computer. So I think that I will give your idea a try now, I think that Powershell Pro Tools, will give me more possibility’s when it can load all PSU modules and own created modules.