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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
cgrace70
Posts: 46
Joined: Wed Jan 26, 2011 3:24 am

Different results in Console and Output window

Post by cgrace70 » Sat May 19, 2012 9:17 am

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
Joined: Thu Aug 18, 2011 4:56 am

Different results in Console and Output window

Post by davidc » Mon May 21, 2012 3:47 am

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
Joined: Wed Jan 26, 2011 3:24 am

Different results in Console and Output window

Post by cgrace70 » Mon May 21, 2012 4:40 am

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
Joined: Thu Aug 18, 2011 4:56 am

Different results in Console and Output window

Post by davidc » Mon May 21, 2012 5:09 am

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
Joined: Wed Jan 26, 2011 3:24 am

Different results in Console and Output window

Post by cgrace70 » Mon May 21, 2012 5:42 am

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
Joined: Thu Aug 18, 2011 4:56 am

Different results in Console and Output window

Post by davidc » Mon May 21, 2012 5:49 am

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.