Error when analyzing script

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.
Richmmc
Posts: 7
Last visit: Sun Apr 18, 2021 7:14 am
Has voted: 1 time

Error when analyzing script

Post by Richmmc »

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: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 1 time

Re: Error when analyzing script

Post by davidc »

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: 7
Last visit: Sun Apr 18, 2021 7:14 am
Has voted: 1 time

Re: Error when analyzing script

Post by Richmmc »

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.