Debug/Execute remotely

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 6 years and 6 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
SamoelM
Posts: 2
Last visit: Thu Dec 19, 2019 11:30 pm

Debug/Execute remotely

Post by SamoelM »

Product, version and build: Version 5.5.150
32 or 64 bit version of product: 64bit Version
Operating system: Windows 10 1709
32 or 64 bit OS: 64bit

We are trying to test our Scripts on different devices using the "Run Remotely" function of PowershellStudio. Now we are facing following two problems:
1. RSEE ExecutionPolicy
We can only run the code on a different computer, when we set the executionpolicy to "unrestricted" in all "categories". So if we execute the command "Set-ExecutionPolicy Unrestricted" the function still doesn't work. It says following error:
Execution policy set to "Restricted". Cannot execute script.
Then we needed to set every category. The categories "MachinePolicy", "UserPolicy" and "LocalMachine" are done with a GPO. The categories "process" and "CurrentUser" we needed to change over the console on the device where we wanted to run the code.
After we changed all those settings we were able to use the function "Run Remotely RSEE"
Is there a way to do this easier than change every ExecutionPolicy? And do we need to change every policy (because of the security)?

2. Debug Remotely
After we got it running we tried the function "Debug Remotely". After we started the execution nothing happened. We were waiting around 30 minutes and still nothing happened, after that we cancelled the execution. We got no error or similar. In the output-section was following information during the whole time:
>> Remote Debugging (test.ps1) Script...
>> Remote Host: Computername
>> Platform: V5 64Bit (STA)
>> Connecting to RSEE Host...


Are we doing something wrong or is this a bug?

We tried it on two devices without success, both had installed and running RSEE:
Device 1: Windows 7 64bit
Device 2: Windows 10 1709 64bit

Thank you for your help :)
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Debug/Execute remotely

Post by davidc »

1. You should sign scripts before running them on remote computers. This is typical PowerShell behavior and it requires you to configure the execution policy if you want to run unsigned scripts.

2. It could be that the communication is blocked. Make sure you have firewall exceptions for the necessary ports (client and server). To see the ports numbers, go to Options->Debugger.
David
SAPIEN Technologies, Inc.
User avatar
SamoelM
Posts: 2
Last visit: Thu Dec 19, 2019 11:30 pm

Re: Debug/Execute remotely

Post by SamoelM »

The first question with the unsigned scripts is solved like this. Thank you :)

The firewall is turned off for the domain, so that couldn't be the problem. Any other ideas?
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: Debug/Execute remotely

Post by davidc »

We were able to reproduce the issue on our end and are investigating.
David
SAPIEN Technologies, Inc.
This topic is 6 years and 6 days old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.