Product, version and build:
PowerShell Studio 2017 v5.4.139 64bit
Operating system:
Windows 7 SP1 64bit
PowerShell Version:
5.1.14409.1005
Whenever my scripts get analyzed in PowerShell Studio I get a message, in the debug panel, similar to the following:
>> Analyzing Script (Fix-BadShortcuts.ps1) ...
AuthorizationManager check failed.
>> Analyzing Script Completed (0 items: 0 Errors, 0 Warnings, 0 Information)
Scripts still function perfectly well.
Where should I be looking to find the cause?
Thanks.
Minor fail analyzing scripts
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.
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.
Re: Minor fail analyzing scripts
A couple follow-up questions to help diagnose what's going on here:
https://github.com/Microsoft/vsts-tasks ... -166344407
https://github.com/davidfowl/nugetpowertools/issues/8
- Where are your scripts located? Are they on your local machine or are you accessing a file server of sorts?
- Does this happen in a regular PowerShell console or just within PowerShell Studio?
- What're your settings for your execution policy?
https://github.com/Microsoft/vsts-tasks ... -166344407
https://github.com/davidfowl/nugetpowertools/issues/8
DevinL
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Minor fail analyzing scripts
Hi,
Sorry for the delay (big Exchange migration happening).
In fact it was while trying to figure out what was up with the new Exchange Management Shell, that I realized it was the execution policy that was causing all of my problems.
It was set (via group policy for the domain) to AllSigned.
I guess I'm going to have to either:
Filter the policy (apply to non-IT users only)
or
Find all of the unsigned scripts and modules on Exchange Servers and IT dept. PCs, and sign them.
Does that sound about right?
Many thanks.
P.S. I realize now that this is a PowerShell problem, not a PowerShell Studio problem.
Sorry for the delay (big Exchange migration happening).
In fact it was while trying to figure out what was up with the new Exchange Management Shell, that I realized it was the execution policy that was causing all of my problems.
It was set (via group policy for the domain) to AllSigned.
I guess I'm going to have to either:
Filter the policy (apply to non-IT users only)
or
Find all of the unsigned scripts and modules on Exchange Servers and IT dept. PCs, and sign them.
Does that sound about right?
Many thanks.
P.S. I realize now that this is a PowerShell problem, not a PowerShell Studio problem.
Re: Minor fail analyzing scripts
It is considered a best practice to sign your scripts.
I recommend enabling the Automatically sign .ps1 scripts when saving option, under Options->PowerShell:
This way you don't have to manually sign the scripts.
I recommend enabling the Automatically sign .ps1 scripts when saving option, under Options->PowerShell:
This way you don't have to manually sign the scripts.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
Re: Minor fail analyzing scripts
Hi,
Sorry - what I meant was that it's all the scripts from external sources that seem to need signing,
e.g. scripts from NuGet, scripts that came with Microsoft Exchange management tools etc.
I guess I should write a script to hunt them all down & sign them.
All of the scripts & executables I create with PowerShell Studio are already auto-signed - otherwise they wouldn't survive the AllSigned execution policy.
Sorry - what I meant was that it's all the scripts from external sources that seem to need signing,
e.g. scripts from NuGet, scripts that came with Microsoft Exchange management tools etc.
I guess I should write a script to hunt them all down & sign them.
All of the scripts & executables I create with PowerShell Studio are already auto-signed - otherwise they wouldn't survive the AllSigned execution policy.
Re: Minor fail analyzing scripts
Ah - just checked a bunch of MS scripts and they are signed with a Microsoft cert.
Maybe I need to figure out why aren't being trusted by my PC.
Maybe I need to figure out why aren't being trusted by my PC.
Re: Minor fail analyzing scripts
Depending on how the scripts are downloaded, you might have to "Unblock" the files in order for them to run.
David
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.