I have two versions of PSScriptAnalyzer in C:\Program Files\WindowsPowerShell\Modules - version 1.13.0 and 1.16.0.
If I use
import-module -requiredversion 1.13.0and then do get-command -module PSScriptAnalyzer I see that 1.13.0 is loaded. However, if I remove the module and repeat the import using -FullyQualifiedName
import-module -FullyQualifiedName @{ModuleName = ‘PSScriptAnalyzer’;ModuleVersion = ‘1.13.0’}and repeat the get-command -module PSScriptAnalyzer, I see the commands from 1.16.0 instead. Any ideas? PEBKAC error, or bug? (I’ve already done internet searches and can’t find any reported bugs.) TIA!