Different results in Console and Output window

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 11 years and 10 months 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
cgrace70
Posts: 46
Last visit: Tue Sep 28, 2021 4:39 pm

Different results in Console and Output window

Post by cgrace70 »

I was testing some code and I have a signed script with only the "Get-ExecutionPolicy" cmdlet in it. The execution policy of the computer is currently set to "AllSigned". 1) When I run the script from a powershell console (inside or outside of PowerShell Studio) it correctly reports back that the execution policy is set to "AllSigned". 2) When I run the script using "Run File" the Output window shows the result "RemoteSigned". If this is an issue with output from this cmdlet, what other cmdlet's could have the same issue? I am running this on a 32-bit Windows XP Pro operating system. I used the same system to create the certificate and .PFX file to be used by PowerShell Studio to sign the scripts on "Save".
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Different results in Console and Output window

Post by davidc »

Are you using different platforms? The Execution Policy can be different for 32bit & 64bit platforms. Press the Execution Policy button in the ribbon and you should be able to see the settings for both platforms. David
David
SAPIEN Technologies, Inc.
User avatar
cgrace70
Posts: 46
Last visit: Tue Sep 28, 2021 4:39 pm

Different results in Console and Output window

Post by cgrace70 »

I am running 32-bit Windows XP Pro. I only have access to the 32-bit platform. It is set to "AllSigned". The 64-bit platform is blank and greyed out.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Different results in Console and Output window

Post by davidc »

OK I spoke with the Dev team and here is what is happening: Turns out the application pulls a Jedi mind trick on PowerShell and tells it:
David
SAPIEN Technologies, Inc.
User avatar
cgrace70
Posts: 46
Last visit: Tue Sep 28, 2021 4:39 pm

Different results in Console and Output window

Post by cgrace70 »

Thanks. At least I know to look out for it. Unfortunately, the script I was working on needed to check the Execution Policy. I ended up going in another direction, but thought I would report it.
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Different results in Console and Output window

Post by davidc »

In situations like these you can choose to run the script inside the console instead of using the internal host. David
David
SAPIEN Technologies, Inc.
This topic is 11 years and 10 months 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.