Page 1 of 1

Error when analyzing script

Posted: Tue Feb 05, 2019 5:51 am
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?


Re: Error when analyzing script

Posted: Tue Feb 05, 2019 7:54 am
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.

Re: Error when analyzing script

Posted: Wed Feb 06, 2019 1:23 am
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.