Error when analyzing script

Support for all customers who have purchased a SAPIEN PowerShell Studio product license. This forum 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.
Richmmc
Posts: 2
Joined: Tue Nov 13, 2018 8:31 am

Error when analyzing script

Post by Richmmc » Tue Feb 05, 2019 6:51 am

Product, version and build: PowerShell Studio 2019 Version 5.6.157
32 or 64 bit version of product: 64 Bit
Operating system: Windows 10
32 or 64 bit OS: 64 Bit

Hi All,

I have recently starting receiving the following messaing when analyzing or running/debugging a script. I have also noticed a sharp increase in the delay between hitting the debug button and the form appearing.

The following error occurred while loading the extended type data file:
Microsoft.PowerShell, C:\Program Files\WindowsPowerShell\Modules\PSScriptAnalyzer\ScriptAnalyzer.types.ps1xml: The file was skipped because of the following validation exception: AuthorizationManager check failed..

Any suggestions on how to resolve this?

Thanks

User avatar
davidc
Posts: 5726
Joined: Thu Aug 18, 2011 4:56 am

Re: Error when analyzing script

Post by davidc » Tue Feb 05, 2019 8:54 am

This is an issue with the PSScriptAnalyzer module itself. What version of the module do you have installed?

You can try the following:

1. Check your execution policy. This could affect the loading of modules.
2. Try updating the module.
3. Make sure the ps1xml is not blocked. Usually happens when a file is downloaded from the internet.
David
SAPIEN Technologies, Inc.

Richmmc
Posts: 2
Joined: Tue Nov 13, 2018 8:31 am

Re: Error when analyzing script

Post by Richmmc » Wed Feb 06, 2019 2:23 am

Hi David,

Module version is 1.17.1 which module manager informs me is up-to-date.

Current Execution Policy is unrestricted.
For certainty, I have run the unblock-file cmdlet against the contents of the directory to no effect.
Get-ChildItem "C:\program files\windows\powershell\modules\psscriptanalyzer\*" | unblock-file

Error persists, I will attempt to remove and download the module again later today and see if that resolves the problem.

Thanks for your help so far.