Page 1 of 1

Different results in Console and Output window

Posted: Sat May 19, 2012 9:17 am
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".

Different results in Console and Output window

Posted: Mon May 21, 2012 3:47 am
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

Different results in Console and Output window

Posted: Mon May 21, 2012 4:40 am
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.

Different results in Console and Output window

Posted: Mon May 21, 2012 5:09 am
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:

Different results in Console and Output window

Posted: Mon May 21, 2012 5:42 am
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.

Different results in Console and Output window

Posted: Mon May 21, 2012 5:49 am
by davidc
In situations like these you can choose to run the script inside the console instead of using the internal host. David