Modules Explorer not actually updating modules

Tool: Visual Studio CodePowerShell Module
Version: PowerShellProTools 5.9.3

When i go into the PowerShell Pro Tools Module Explorer, it reports that are modules to update.
When I click on the update button, the tool reports that it was updated, but...

let's take SysInfo as an example.  The explorer shows this, after I click the update button

![image|416x48](upload://r9FKhpkwB7iOp0FYTbaZbwCuikC.png)


but if I look in the output file, I see these entries

[8/12/2021 14:39:08] Executing command: Update-Module -Name 'SysInfo' -Force -AcceptLicense

[8/12/2021 14:39:09] Error executing PowerShell: Module 'SysInfo' was not installed by using Install-Module, so it cannot be updated.

[8/12/2021 14:39:09] Executing command: Get-Module -List -Name $SysInfo | Where-Object Version -eq '1.2.0' | Select-Object -ExpandProperty Path

[8/12/2021 14:39:09] Error executing PowerShell: Cannot validate argument on parameter 'Name'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.


I can see it not working for some reason or another, but it shouldn't tell me that is successfully completed.

And most of the modules on my machine have been installed with Install-Module.  Very weird that it reports that.

Like with PowerShellProTools itself.  I'm currently at 5.8.10, although 5.9.3 is available, but I get the same error - "not installed with Install-Module".  But it was.   Any ideas on what might be causing this weird behavior?


Are you running against Windows PowerShell 5.1?

It operates the same whether I’m using Windows PowerShell 5.1 or PowerShell 7.1.4.

Ok. I’ll open an issue so we can get resolved.

Excellent news. Let me know if I can provide any more information to you to help resolve this.

1 Like