$env:PSModulepath with Microsoft.PowerShell.PSResourceGet on macOS

Hi Community !

Its been a long time since my last content blog, but i am just facing an issue, you also might face now or in the future its worth writing about.

It is about the switch from the old „Module“ based CmdLets (Find-Module, Install-Module, …) to the „PSResource“-based CmdLets with Microsoft.PowerShell.PSResourceGet.

The point is that Modules, installed from the PowerShell Gallery with Install-Module are stored in the path ~/.local/share/powershell/Modules

For example my PowerShellAI Module (in an outdated version) dan be found here:

Looking for a new version of the module with Find-PSResource emits this:

Ok then, so lets update!

That didnt work – most likely because the installer looks into the wrong folder for updating.

To fix this i need to uninstall and reinstall the module

If we now look an the path of the installed module we find a completely different path.

Make sure this path is within your $env:PSModulePath by updating your $profile:

Cheers/Roman

Leave a Reply